0

I have a Java application. How do I use it as consumer of messages in activemq? Do I need to write any code where I will be passing my name of java application to list it as a consumer?

Or do I need to integrate any software (like camel, spring) which will help me to achieve this. Right now what I am looking for is that this Java application needs to be called when activemq gets populated with a message.

If I need to integrate something into my activemq please put some links which will clearly explain how to go about the integration.

PS I am new to activemq and I am super dependent on your help .

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
shiva
  • 77
  • 7
  • Related link: http://stackoverflow.com/questions/9015882/activemq-publisher-subscriber-hello-world-example – Gilbert Le Blanc Sep 05 '13 at 14:23
  • If you are working on a Spring application. Or have knowledge of how to work with it, it's pretty simple. http://static.springsource.org/spring/docs/3.0.x/reference/jms.html – digao_mb Sep 05 '13 at 14:48

1 Answers1

0

If you are working on a Spring application. Or have knowledge of how to work with it, it's pretty simple.

The configuration would be something like this:

<bean id="messageListener" class="jmsexample.ExampleListener" />


<bean id="jmsContainer"     class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="destination" ref="destination"/>
    <property name="messageListener" ref="messageListener" />
</bean>

Look at the documentation: http://static.springsource.org/spring/docs/3.0.x/reference/jms.html

digao_mb
  • 1,294
  • 16
  • 23
  • OP and me both are working on same task.Spring is a framework written on Java.Basically we are not Java developers.So can you suggest in another way. you mention some XML code,where will I found that file. – Hanumath Sep 06 '13 at 06:48