-
Aug 13th, 2011, 12:35 PM
#1
RabbitMQ + Spring AMQP Configuration
I'm currently using ActiveMQ and want to try out RabbitMQ; to that end I need some clarification on the following:
- Can I use org.springframework.amqp.rabbit.listener.adapter.M essageListenerAdapter and org.springframework.amqp.rabbit.listener.SimpleMes sageListenerContainer, to listen for and handle messages like I do with org.springframework.jms.listener.adapter.MessageLi stenerAdapter and org.springframework.jms.listener.DefaultMessageLis tenerContainer?
- The hello world example on github does not demonstrate how to create an exchange or how to bind a queue to it. Can anyone explain how to do so or point me to an example that does?
-
Aug 14th, 2011, 06:32 AM
#2
Yes, the listener container model is designed to look and feel as much like Spring Jms counterparts as possible.
The hello-world sample only uses the default exchange and binding. The stocks sample uses explicit exchanges and bindings (e.g. https://github.com/SpringSource/spri...let-config.xml), and there are examples in the user guide (http://static.springsource.org/sprin...-configuration). The easiest thing is to declare bean definitions of the right type and a RabbitAdmin with autoStartup=true, and the namespace takes care of that if you use XML.
Last edited by Dave Syer; Aug 15th, 2011 at 02:38 AM.
Reason: spelling
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules