Darren, I did the below suggested approach but I am still not able to inject 'EventBus'. I am still getting to understand new way loading components after spring modularisation. Could you please suggest what am I doing wrong. Here is what I did.
I added a module.properties and spring-event-bus-context.xml files to plugins/event-bus/rabbitmq. Module context gets loaded and gets initialised as well. But 'ComponentContext.getComponent(EventBus.class)' fails with no matching bean definition. Does the interface and corresponding implementation are discovered automatically from class patch scanning? Or do I need to do register interface and its extensions in the registry? Thanks, Murali From: Darren Shepherd <darren.s.sheph...@gmail.com<mailto:darren.s.sheph...@gmail.com>> Date: Monday, 25 November 2013 11:37 PM To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" <dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>> Cc: Alena Prokharchyk <alena.prokharc...@citrix.com<mailto:alena.prokharc...@citrix.com>>, Min Chen <min.c...@citrix.com<mailto:min.c...@citrix.com>>, Murali Reddy <murali.re...@citrix.com<mailto:murali.re...@citrix.com>>, Darren Shepherd <darren.sheph...@citrix.com<mailto:darren.sheph...@citrix.com>> Subject: Re: Enabling AMQP/RabbitMQ Events on master Just create a file on the classpath META-INF/cloudstack/core/spring-event-bus-context.xml with the below contents (change server, port, username, etc) <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd" > <bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus"> <property name="name" value="eventNotificationBus" /> <property name="server" value="10.223.52.61" /> <property name="port" value="15672" /> <property name="username" value="guest" /> <property name="password" value="guest" /> <property name="exchange" value="cloudstack-events" /> </bean> </beans> You can put that file at /etc/cloudstack/management/META-INF/cloudstack/core/spring-event-bus-context.xml Darren On Mon, Nov 25, 2013 at 8:24 AM, David Grizzanti <david.grizza...@sungard.com<mailto:david.grizza...@sungard.com>> wrote: Murali, Would you be able to comment on how to enable the event message bus notifications on master? Thanks! -- David Grizzanti Software Engineer Sungard Availability Services e: david.grizza...@sungard.com<mailto:david.grizza...@sungard.com> w: 215.446.1431<tel:215.446.1431> c: 570.575.0315<tel:570.575.0315> On November 21, 2013 at 12:35:31 PM, Alena Prokharchyk (alena.prokharc...@citrix.com<mailto:alena.prokharc...@citrix.com>) wrote: Murali might help you with that as he developed the feature. -Alena. From: Min Chen <min.c...@citrix.com<mailto:min.c...@citrix.com><mailto:min.c...@citrix.com<mailto:min.c...@citrix.com>>> Date: Thursday, November 21, 2013 9:30 AM To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org><mailto:dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>" <dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org><mailto:dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>>, Alena Prokharchyk <alena.prokharc...@citrix.com<mailto:alena.prokharc...@citrix.com><mailto:alena.prokharc...@citrix.com<mailto:alena.prokharc...@citrix.com>>> Cc: Darren Shepherd <darren.sheph...@citrix.com<mailto:darren.sheph...@citrix.com><mailto:darren.sheph...@citrix.com<mailto:darren.sheph...@citrix.com>>> Subject: Re: Enabling AMQP/RabbitMQ Events on master CC Darren here, I am having the same question on current master. Thanks -min On 11/21/13 5:00 AM, "David Grizzanti" <david.grizza...@sungard.com<mailto:david.grizza...@sungard.com><mailto:david.grizza...@sungard.com<mailto:david.grizza...@sungard.com>>> wrote: Alena, Do you or anyone else on the list have any updated information about enabling the events on master? Thanks! On Thursday, November 7, 2013, David Grizzanti wrote: Alena, I don't think these steps will work on master (not installing packages of cloudstack), I'm building from source. The componentContext XML file doesn't seem to exist anymore since some of the Spring refactoring was done. Thanks On Thu, Nov 7, 2013 at 12:42 PM, Alena Prokharchyk < alena.prokharc...@citrix.com<mailto:alena.prokharc...@citrix.com><mailto:alena.prokharc...@citrix.com<mailto:alena.prokharc...@citrix.com>>> wrote: David, Here are the instructions that I've got from one of the CS QA engineers, hope it helps. FS - http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.1.0/html/Admi n_Guide/events.html#event-framework Test cases relating to this feature was covered as part of Regions Feature testing - https://cwiki.apache.org/confluence/download/attachments/30757955/Regions -Test-Execution-42.xlsx Steps to set up RabbitMQ Server: Have a RabbitMQ server set up. Enable rabbitmq_management plugin C:\Program Files\RabbitMQ Server\rabbitmq_server-3.0.3\sbin>rabbitmq-plugins enable rabbitmq_management Restart RabbitMQ service. In management server : Added the following in /usr/share/cloudstack-management/webapps/client/WEB-INF/classes/component Context.xml <bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus"> <property name="name" value="eventNotificationBus"/> <property name="server" value="10.223.52.61"/> <property name="port" value="15672"/> <property name="username" value="guest"/> <property name="password" value="guest"/> <property name="exchange" value="cloudstack-events"/> </bean> Restart management server. -Alena. From: David Grizzanti <david.grizza...@sungard.com<mailto:david.grizza...@sungard.com><mailto:david.grizza...@sungard.com<mailto:david.grizza...@sungard.com>>> Reply-To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org><mailto:dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>" <dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org><mailto:dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>> Date: Thursday, November 7, 2013 5:04 AM To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org><mailto:dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>" <dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org><mailto:dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>> Subject: Enabling AMQP/RabbitMQ Events on master Hi, I was looking for some help in enabling the AMQP/RabbitMQ events in CloudStack. I'm familiar with enabling these events in 4.2, however, I'm not all the familiar with Spring and given the new modularized changes I'm not really sure where the XML snippet belongs for the eventNotificationBus. Previously I had been placing this in applicationContext. -- David Grizzanti Software Engineer Sungard Availability Services e: david.grizza...@sungard.com<mailto:david.grizza...@sungard.com><mailto:david.grizza...@sungard.com<mailto:david.grizza...@sungard.com>> w: 215.446.1431<tel:215.446.1431> c: 570.575.0315<tel:570.575.0315>