What happens to topic message if all non durable consumers fail?

No one receives it.

“Nondurable subscribers receive messages only when they are actively listening on that topic. Otherwise, the message is gone. In the pub/sub model, there is no real concept of a “topic” holding all of the messages; rather, when a message is received by the JMS provider, the provider makes a copy of that message for each subscriber. If the subscriber is not active, it does not receive a copy of that message.”

If you allow the dynamic creation of durable subscribers, keep in mind the storage for those messages may greatly increase.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.