In my application, I have an AMQP inbound channel adapter that listens to a single queue on a RabbitMQ server. The queue gets data from a different system all together. When RabbitMQ is restarted, the queue is destroyed, which is fine. The problem is that my application doesn't automatically declare the queue upon startup. I assumed having declared the queue using the rabbit namespace in my config, the queue would get created during startup, but that doesn't seem to be the case.
The other system that publishes data to the queue doesn't use Spring at all. It just uses a basic RabbitMQ client setup which declares the queue in code. As soon as I publish something to the queue from that remote system, then my consuming application works fine. I just need to be able to have the queue created (if possible) by my consuming application if it doesn't already exist.
This is my Spring Integration config.
Thanks.Code:<int-amqp:inbound-channel-adapter channel="queuedDocketNumberChannel" queue-names="${amqp.getCompanyQueue}" error-channel="errorChannel"/> <service-activator input-channel="queuedDocketNumberChannel" ref="queuedDocketNumberServiceActivator"/> <rabbit:connection-factory id="rabbitConnectionFactory" host="${amqp.host}"/> <rabbit:queue name="${amqp.getCompanyQueue}"/>


Reply With Quote
