[rabbitmq-discuss] RabbitMQ and Spring

Dave Syer david_syer at hotmail.com
Thu Jul 28 13:10:27 BST 2011


Your application context does not declare are beans of type Exchange,
Queue or Binding, so the RabbitAdmin is left with nothing to do.  That
would explain why you need to declare them manually in the Java
snippet. Note that there is a <rabbit:/> namespace for declaring most
of the stuff that you have done longhand using <beans:/>, and also for
declaring the exchanges, queues and bindings.  It also creates a
CachingConnectionFactory, not a SIngleConnectionFactory, which is
better for performance and resilience.

You didn't say which version of Spring AMQP you are using but I can
tell from the stack trace at the end that it is not 1.0.0.RC2, which
depends on the Rabbit Client 2.5.1.  If you upgrade that should make
things easier.


More information about the rabbitmq-discuss mailing list