[rabbitmq-discuss] To declare a MQ listener at java application startup

Jon Brisbin jon.brisbin at npcinternational.com
Mon Aug 9 18:43:42 BST 2010


There's actually a lot of ways to go about this:

1) If you're using Spring, then just configure a bean in your app-context.xml. 

2) You could use the new spring-amqp classes: http://www.springsource.org/spring-amqp

3) You could manually configure them from the servlet init method.

I also run listeners that integrate with the Tomcat server. You can configure them in different ways depending on the context. You could set up a global naming resource, or you could scope it to your web application by putting it in META-INF/context.xml: http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html

Jon Brisbin
Portal Webmaster
NPC International, Inc.



On Aug 9, 2010, at 11:33 AM, archana v wrote:

> Hi All,
> 
> I am new to rabbit-mq. I would like to know  how to start a MQ listner(Java Client) to listen to a queue at the application start up.  I am deploying my application in tomcat server.
> Thanks in advance for your help.
> 
> 
> Thanks and Regards,
> Archana 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100809/f32a0f6e/attachment.htm>


More information about the rabbitmq-discuss mailing list