Java Messaging Service API

Let's look at how Reactive Streams compares to the Java Messaging Service (JMS) API. The JMS specification describes a Queue and a Topic, to which a producer and a consumer can connect:

@Resource(lookup = "jms/Queue")private static Queue queue;@Resource(lookup = "jms/Topic")private static Topic topic;Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);MessageProducer producer = session.createProducer(queue);MessageConsumer consumer = session.createConsumer(topic)

Here, the producer  is responsible for generating unbounded events on the queue or topics, while the consumer actively consumes the events. The producer and consumer are working in isolation, at their own rates. The task of managing ...

Get Hands-On Reactive Programming with Reactor now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.