此内容没有您所选择的语言版本。
Chapter 8. Reliability and Quality of Service
8.1. Link Reliability 复制链接链接已复制到粘贴板!
8.1.1. Reliable Link 复制链接链接已复制到粘贴板!
An acquiring message consumer (also known as a competing message consumer) is a message consumer who removes messages from a queue, and makes them unavailable to other consumers. When an acquiring message consumer fetches a message from the broker over a reliable link, the message is set to acquired. In the acquired state the message is not visible to other consumers. It is to all intents and purposes acquired by the consumer, but the broker maintains its copy in acquired state until the consumer acknowledges acquisition. At that point the broker considers the message reliably delivered, and will delete its copy.
redelivered: true.
alternate exchange, if one has been configured for this queue or exchange. If no alternate exchange is configured, the message will be discarded.
When a message is sent to the broker over a reliable link, the sender maintains its local copy until the broker acknowledges receipt. At that time the sender deletes the local copy. When sending synchronously this causes the application to block until this exchange has taken place. When sending asynchronously these unacknowledged sent messages are stored in the sender replay buffer.
All links to queues are reliable by default. It is not necessary to explicitly request a reliable link when connecting to a queue.
link: {'reliability': 'at-least-once'} in the address. For example:
sender = session.sender("amq.topic;{link: {'reliability': 'at-least-once'}}")
sender = session.sender("amq.topic;{link: {'reliability': 'at-least-once'}}")
8.1.2. Unreliable Link 复制链接链接已复制到粘贴板!
unreliable link when establishing a connection to a queue.
unreliable link, the broker deletes it immediately, without waiting for the consumer to acknowledge that it received and successfully actioned a message.
unreliable link, although this is be no means certain. The most obvious use for an unreliable link is when a large volume of data is being transmitted at high speed and data loss is not an issue.
unreliable link
To request an unreliable link, specify link: {'reliability': 'unreliable'} in the address for the receiver or sender. For example:
- Python
sender = session.sender("amq.topic;{link: {'reliability': 'unreliable'}}")sender = session.sender("amq.topic;{link: {'reliability': 'unreliable'}}")Copy to Clipboard Copied! Toggle word wrap Toggle overflow