Message Delivery Modes

PubSub+ event brokers support the following types of message delivery:

  • Direct Messaging
  • Guaranteed Messaging

Direct Messaging

Direct messaging is meant for use with high-rate or very low-latency message messaging applications that can tolerate occasional message loss. Producers can publish messages to a topic and, when the messages are received by the event broker, they can be delivered efficiently to a large number of clients with matching topic subscriptions. Direct messaging has the following characteristics:

  • Clients subscribe to topics directly
  • Messages are not retained for a client when that client is not connected to an event broker or event broker service.
  • Messages can be discarded when congestion or system failures are encountered.
  • Messages are not acknowledged upon delivery.

Illustration depicting the concepts described in the surrounding text.

To learn more, see Direct Messages.

Guaranteed Messaging

Guaranteed messaging, also known as persistent messaging, are most appropriate for messaging applications that require persistent storage of the messages they send or intend to receive.

Guaranteed messaging has the following characteristics:

  • Topic subscriptions are associated with an endpoint on the broker rather than consuming clients
  • Messages can't be lost once they are acknowledged by the event broker
  • When messages are delivered to a durable endpoint, they are retained until they are consumed by a client
  • Delivery to a client is acknowledged

To learn more, see Guaranteed Messages.

Publishing Guaranteed Messages

When clients publish a guaranteed message to a topic and the event broker has an endpoint with a matching subscription, the message and a list of matching subscriptions is stored or persisted, on the broker. After acknowledging receipt of the message, the event broker attempts to deliver the message to all matching consumers. As each consumer acknowledges receipt of the message, the associated match is deleted from the match list for the message. Once there are no matches left associated with a message, the message itself is deleted from the broker.

Illustration depicting the concepts described in the surrounding text.

Receiving Guaranteed Messages

Messages are delivered to consumers that are bound to the endpoints that have received the guaranteed messages. Those messages are persisted on the event broker until they expire, or until the consuming client acknowledges the messages, indicating they have been consumed.

Illustration depicting the concepts described in the surrounding text.

Now let's move on to Topic Endpoints and Queues