activemq-artemis/examples/features/standard/durable-subscription
Domenico Francesco Bruscino a549fcedde [maven-release-plugin] prepare release 2.15.0 2020-08-24 16:03:12 +02:00
..
src/main ARTEMIS-1562 Refactor example documentation 2017-12-15 14:54:16 +00:00
pom.xml [maven-release-plugin] prepare release 2.15.0 2020-08-24 16:03:12 +02:00
readme.md ARTEMIS-1562 Refactor example documentation 2017-12-15 14:54:16 +00:00

readme.md

JMS Durable Subscription Example

To run the example, simply type mvn verify from this directory, or mvn -PnoServer verify if you want to start and create the broker manually.

This example demonstrates how to use a durable subscription with ActiveMQ Artemis.

Durable subscriptions are a standard part of JMS, please consult the JMS 1.1 specification for full details.

Unlike non durable subscriptions, the key function of durable subscriptions is that the messages contained in them persist longer than the lifetime of the subscriber - i.e. they will accumulate messages sent to the topic even if the subscriber is not currently connected. They will also survive broker restarts. Note that for the messages to be persisted, the messages sent to them must be marked as persistent messages.