Yep working as designed :) topics are broadcast destinations. They will deliver messages to whomever is listening at the time. If you need queuing semantics check out virtual destinations or durable subscribers. You could also take a look at subscription recovery policy on the broker side.
Cheers Christian On Thursday, September 5, 2013, AlexP wrote: > I am just starting with ActiveMQ 5.8.0 and I have the REST example running, > however, if I put a message into a Queue or Topic before the consumer is > up, > the consumer does not get the message. If, on the other hand, I start the > consumer first and then post my message, then consumer sees the message. > > So this works (the consumer waits, until a message is sent) > > (start consumer => consumer waits for the message) > wget -qO- > "http://localhost:8161/api/message/TESTAAAAA?type=topic&clientId=consumerA > " > > (post message => consumer receives the message) > curl -d "body=ThisIsAtestMessage" > "http://localhost:8161/api/message/TESTAAAAA?type=topic" > > This does not work (the consumer does not get the message): > > (post message) > curl -d "body=ThisIsAtestMessage" > "http://localhost:8161/api/message/TESTAAAAA?type=topic" > > (start consumer => consumer is waiting for the message, but does not see > the > message just posted) > wget -qO- > "http://localhost:8161/api/message/TESTAAAAA?type=topic&clientId=consumerA > " > > So, if I put the message first, then consumer does not see that message > when > started. There is probably something basic that I am missing, but I am not > sure what setting to adjust. > > Can someone point me toward the proper parameter that I may be missing? > > Thanks. > -AP_ > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/AMQ5-8-0-Strange-consumer-producer-dependency-issue-tp4671242.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta