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>