Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. durableTopicSubscriber is run to create a durable topic subscriber.
  2. 5 messages are sent to the myTopic topic. The messages will be received and printed by the subscriber named durableTopicSubscriber.
  3. The durableTopicSubscriber is stopped.
  4. The publisher is run again and 5 more messages are sent.
  5. While running durableTopicSubscriber again, 5 different messages are sent to the same topic. You will see that all 10 messages (including the messages sent to the topic when the subscriber was absent) are consumed by the durableTopicSubscriber.
  6. 200 more messages are sent. durableTopicSubscriber will close after 100 messages are received. After running durableTopicSubscriber again you will receive nothing (as durableTopicSubscriber was unsubscribed after receiving 100 messages).