This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
With ActiveMQ, one can create a queue (or topic) on the fly, which is pretty cool. But I'm wondering if the queue can actually be created by a Consumer rather than a Producer.
Specifically, here's the issue I'm having. On application startup, I initialize a class that implements MessageListener and registers itself like this:
later on, a producer creates a queue also called "unique-subject" and places a message on it. What happens is the first time after I restart ActiveMQ, my MessageListener's onMessage() method is never called. However, when I subsequently run the application, onMessage() is in fact called (as long as I don't restart ActiveMQ).
This makes me think that the MessageListener is not being properly bound until the queue is created by a Producer. Is that how ActiveMQ actually behaves, or is this likely my error?
Thanks in advance.
Dave Taubler<br />Specializing in <a href="http://taubler.com/articles/" target="_blank" rel="nofollow">Java and Web Development</a>