JMS - Publish/Subscribe Messaging Example in Java using ActiveMQ

preview_player
Показать описание
JMS - Publish/Subscribe Messaging Example in Java using ActiveMQ

How do I subscribe to a topic in ActiveMQ?
Subscribers can subscribe to a topic on ActiveMQ as durable subscribers by using the createDurableSubscriber() method available in javax. jms. Session class. To create a non-durable subscriber, instead of using the session.

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic, which functions somewhat like a bulletin board. Subscribers can receive information, in the form of messages, from publishers. Topics retain messages only as long as it takes to distribute them to current subscribers.

The following post introduces the basic concepts of JMS point-to-point messaging and illustrates them with a code sample using ActiveMQ and Maven.
Рекомендации по теме
welcome to shbcf.ru