Closed johntdyer closed 10 years ago
Hi John - Topics are not queues.
I think there is indeed a misunderstanding on your part about how 'topics' actually work.
With ActiveMQ (and other brokers) you will only receive messages that are published to a 'topic' when there is a currently active 'subscribe'. You will not receive messages that have been previously published. That is normal 'pub-sub' behavior for 'topics'.
For specific ActiveMQ details see:
https://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html
In particular, note the last sentence of the "Topics" section.
Other brokers (Apollo, RabbitMQ) behave similarly.
For a more generalized description of 'pub-sub' see:
http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern
If you are satisfied with this reply, please close this issue. Otherwise reply here.
Regards, Guy
Thanks!
I am trying to connect to a topic which may already have messages in the queue. I would expect stomp to fetch existing messages from the queue when connecting, however it only seems to process new messages sent after the client started it's connection. This seems to "orphan" these messages which existed prior to the subscription. Perhaps I am misunderstanding something ?
My example is pretty simple.
Thanks !
-John