liveBook · Manning

Push model

As explained in Spring in Action, Sixth Edition

A push model is a messaging consumption pattern in which the messaging system delivers available messages to a consumer automatically.

A push model lets the messaging system deliver available messages automatically by invoking a message listener. Unlike a pull model, it does not require application code to request a message or block while waiting. Push generally avoids tying up a thread, although a listener can become overburdened when messages arrive too quickly. section 9.1.3

Listening for orders

A Spring component can listen to the `tacocloud.order.queue` destination with `@JmsListener`. When a message arrives, Spring invokes `receiveOrder(TacoOrder order)`, allowing the component to pass the converted order directly to the kitchen display. section 9.1.3

How Spring in Action, Sixth Edition covers it

How deep it goes
Explains listener invocation, thread blocking trade-offs, and overload concerns without descending into listener-container internals.
Examples
Uses an OrderListener that receives TacoOrder objects from tacocloud.order.queue and displays them through KitchenUI.
What it assumes
Assumes familiarity with JMS destinations and messages while demonstrating the listener pattern through Spring annotations.
What you can do after
Operate a Spring JMS listener that receives converted domain objects as messages become available.
How it connects
Connects message listeners with JMS, Spring components, destinations, message conversion, and the pull model.

Also explained in

Compare how 4 books explain push model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.