Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

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
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat