Este contenido no está disponible en el idioma seleccionado.

4.5. Exchange Subscription Patterns


There are three different patterns for subscribing to an Exchange:
  1. copy of messages
  2. move of messages
  3. exclusive binding
Copy of Messages

A copy of messages is where each consumer gets their own copy of every message.

Note

This approach is also known as a publish-subscribe pattern, ephemeral or private subscription.
This case creates and binds a temporary private queue that is destroyed when your application disconnects. This approach makes sense when you do not need to share responsibility for the messages between multiple consumers, and you do not care about messages that are sent when your application is not running or is disconnected.
This arrangement makes sense, for example, when a service is logging activity based on messages, or when multiple consumers want notification of events.
Move of Messages

A move of messages is where multiple consumers connect to the same queue and take messages from the queue in a round-robin fashion.

Note

This approach is also known as a Shared Queue.
If consumer A and consumer B are accessing the same shared queue, then consumer A will not see the messages that consumer B takes from the queue. This arrangement makes sense, for example, in a scenario where worker nodes are dispatching jobs from a work queue. You want one node only to see each message.
This allows messages to be buffered in the queue when your application is disconnected, and allows several consumers to share responsibility for the messages in the queue.
This arrangement makes sense, for example, in a scenario where worker nodes are dispatching jobs from a work queue. You want one node only to see each message.
These two patterns are not mutually exclusive - for example, three worker nodes could share a queue in round-robin fashion while another process gets its own copy of the messages in the queue to create an archive.
Exclusive Binding

The third pattern, exclusive binding, is where a consumer mandates that only the consumer may have access to messages routed to an endpoint.

Note

Exclusive binding is not supported by AMQP 1.0
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat