Reputation: 1571
My setup is this: -
Queues are only automatically created when a consumer is added, i.e., in a <from uri="activemq:my-queue" />
, or when a message is sent to a queue that doesn't exist.
In my case this is part of an error handler and it is the DLQ I have a problem with. It doesn't have any consumers so is only created when a message is sent. I'd like to be able to pre-instantiate the queue so that I am able to check it's associated MBean attributes (via Jolokia). Obviously it doesn't exist until a message goes onto the DLQ (hopefully never) which means that there is no MBean to query.
Now I know I can create the queue directly in activemq config but for various reasons that's a difficult path to follow.
So the question is this...
How do you get camel to create a queue before it's produced to and it doesn't have a consumer?
I tried defining <endpoint uri="activemq:my-dlq" />
but I think that's just clutching at straws as it only provides a hook to create a consumer or producer and doesn't actually create the queue.
Upvotes: 0
Views: 2187
Reputation: 55535
You can configure activemq with a number of startup destinations it should create. You do this in the activemq.xml configuration file.
The ActiveMQ web site have a bit of details here
But their website has recently been re-generated and some links are broken. But the pointer is that you setup these destinations in the broker.
Upvotes: 1