Red Hat DocumentationFuse Message BrokerToggle FramesPrintFeedback

Message Producers

A message producer packages and encrypts the message body, sets the service level and protection for the outbound message, and then sends the message to its destination. If the delivery mode is PERSISTENT, the message will be placed in the broker’s log or message store before starting delivery.

Message producers can set a time to live for each message. The calculated expiration time keeps a message in the queue until it expires. Expired messages are discarded.

Request/Reply

An application can use a request/reply mechanism to send a message and then wait for a response. The client application creates a temporary destination to receive the reply.

Quality of Service

Quality of Service refers to message delivery configuration that a producer specifies. Generally, Quality of Service affects the availability, reliability, scalability, and performance of message delivery. Loose Quality of Service uses a minimum number of features to maximize performance. A tighter Quality of Service uses multiple features, such as fault tolerant client connections, acknowledgements, and duplication elimination to maximize reliability, availability and transactional integrity.

For example, a loose Quality of Service might be used by a stock ticker application that wants to publish messages to a large number of subscribers to be consumed immediately. Since there are no security concerns and the information is time-sensitive, performance is at a premium. In contrast, a tight Quality of Service might be used for an online stock purchasing system, in which the company hosting the system wants to ensure transactional integrity, confidentiality, and reliability for all stock purchase transactions.

Quality of Service is supported by the following session options and message producer parameters:

  • Acknowledgement Mode — The session determines whether the acknowledgment of communications between the client and the broker are controlled by the client, the broker, or are simply performed with reasonable efforts. Adding acknowledgements to messaging creates an additional demand on a client application, but also assures greater reliability.

  • Message Expiration — Messages can be sent with a specific life span to make sure clients do not receive out-of-date information. When a message expires, it is dropped from the queue or from the messages stored for disconnected subscriptions.

  • Delivery Mode — A persistent message is stored in the broker’s logs and repository for later delivery to potentially disconnected users. This action provides a higher Quality of Service yet results in a corresponding decrease in performance. A persistent message survives system disconnection, or unexpected restarts. Persistence is maintained as a message is routed across brokers.

  • Guaranteed Persistence — A message can be sent to a system dead letter queue (DLQ) if it expires or is undeliverable. On the DLQ, a message never expires and can only be discarded by explicit administrative action.

  • Priority — Messages can be sent with a priority value that encourages the broker to position that message ahead of other messages in the same queue or topic for delivery.

  • Redelivery — The broker can make repeated attempts to redeliver messages to each client that has not acknowledged receipt.

Comments powered by Disqus