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 
<[email protected]<mailto:[email protected]>>
Date: Monday, 25 November 2013 11:37 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Cc: Alena Prokharchyk 
<[email protected]<mailto:[email protected]>>, Min Chen 
<[email protected]<mailto:[email protected]>>, Murali Reddy 
<[email protected]<mailto:[email protected]>>, Darren Shepherd 
<[email protected]<mailto:[email protected]>>
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 
<[email protected]<mailto:[email protected]>> 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: [email protected]<mailto:[email protected]>
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 
([email protected]<mailto:[email protected]>) wrote:

Murali might help you with that as he developed the feature.

-Alena.

From: Min Chen 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
Date: Thursday, November 21, 2013 9:30 AM
To: 
"[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>"
 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>,
 Alena Prokharchyk 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
Cc: Darren Shepherd 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
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" 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
 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 <
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
 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 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
Reply-To: 
"[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>"
 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
Date: Thursday, November 7, 2013 5:04 AM
To: 
"[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>"
 
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
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: 
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
w: 215.446.1431<tel:215.446.1431>
c: 570.575.0315<tel:570.575.0315>



Reply via email to