When are JMS durable subscriptions a bad idea?

233 views Asked by At

My understanding is that JMS durable subscriptions allow the consumer to receive all messages that are published to a topic, say if there was a lost connection and then connectivity is restored.

Having said this, it seems like durable subscriptions can also cause the JMS broker's message buffer to fill up, eventually creating an overhead for the broker.

What are any other common best practices for not using durable subscriptions with JMS?

For reference, I'm using ActiveMQ "Classic."

1

There are 1 answers

0
Petter Nordlander On BEST ANSWER

Some examples

  • Your consumers are not interested in historical data when they come online. Think of a screen displaying time until a bus arrives at the bus station.

  • You need to distribute load among several nodes in a consumer cluster. Then you need to use queues (VirtualTopics) instead, or go for JMS2.0 in ActiveMQ Artemis.