Receiving Guaranteed Messages

To receive published Guaranteed messages (that is, messages that have a delivery mode of Persistent or Non‑Persistent), a client must create a consumer Flow to bind to a Queue endpoint or a Topic Endpoint provisioned on the event broker. Once the client is bound to the endpoint, it can receive published Guaranteed messages that are delivered and spooled to that endpoint.

When a consuming client successfully receives a Guaranteed message over a Flow, a corresponding application acknowledgment is required to indicate to the event broker that the client application received the message, and then the message can be removed from the endpoint.

Related Event Broker Provisioning and Configuration Information

For clients to consume messages from the Message VPN they are connected to, the event broker must have Guaranteed Messaging and message spooling enabled. In addition, the clients must be assigned appropriately configured client profiles and/or Access Control List (ACL) profiles:

  • To receive messages with a Guaranteed Transport delivery mode, clients must be assigned client profiles that have the allow-guaranteed‑message‑receive parameter enabled. In addition, if clients are going to use non-durable message consumers, the assigned client profiles must also have the allow‑guaranteed‑endpont-create parameter enabled because these clients automatically create temporary queues/topic-endpoints.
  • To allow clients to subscribe to topics (or to only a specific set of topics) clients must be assigned ACLs with the appropriate access controls.

For more information on how to configure event brokers for Guaranteed Messaging and authorizing connected clients through client profiles and ACLs, refer to Client Authentication Configuration.

Queues

Messages published to a Queue destination are spooled to a matching Queue endpoint on the event broker. Therefore, a queue acts as both a destination that messages can be published to and as an endpoint on the event broker that clients can bind to and then browse or consume messages from. In this way, a Queue can be used in a typical Point-to-Point (P2P) model.

However, it is also possible to add Topic subscriptions to a Queue so messages published to matching Topics are delivered to the Queue. (For more information, refer to Adding Topic Subscriptions to Queues.) Therefore, it is also possible to use Queues in a Publish and Subscribe (Pub/Sub) model.

Multiple Flows can be bound to a Queue, but a single spooled message can only be consumed by a single consuming client bound through one of those Flows. If the Queue is configured with an access type of exclusive, only the first Flow to bind can actively receive messages. If the first Flow disconnects, the second Flow can start receiving messages, and so on. An exclusive queue always delivers messages in the order they are received.

If the Queue is configured with an access type of non‑exclusive, each bound Flow receives messages in a round-robin fashion. For more information on access types, refer to Defining Endpoint Properties.

Topic Endpoints

A Topic Endpoint attracts messages published to a Topic that match the Topic subscription that is associated with the endpoint. Topic Endpoints are equivalent to durable topic subscriptions in Java Message Service (JMS). Topic Endpoints can be used in a pub/sub model.

For an exclusive topic endpoint, only one client can bind and receive messages; if other clients attempt to bind, they will be rejected. An exclusive durable topic endpoint always delivers messages in the order they are received. For non-exclusive durable topic endpoints, multiple consumers can bind and each is serviced in round‑robin fashion.

  • When using the Java or .NET APIs, a client must obtain the appropriate Topic instance to use Topic subscriptions to receive messages (refer to Creating Topics).
  • When using the JavaScript or Node.js APIs, both Queues and Topic Endpoints are modeled as queues and passed in as a solace.QueueDescriptor object to the solace.MesssageConsumerProperties, which is used to create the message consumer.
  • It is possible for messages published with a Direct delivery mode to be spooled to a Topic Endpoint when there is a match between the message’s Topic destination and the Topic subscription set for the Topic Endpoint. In this case, when the message is spooled to the endpoint, it is given a non‑persistent delivery mode so that the receiving client can consume the message over its established consumer Flow. For more information, refer to Topic Matching & Message Delivery Modes.

Endpoint Durability

Endpoints can be durable or temporary (that is, non-durable).

  • Durable endpoints have life spans independent of any particular Session. Messages can accumulate on a durable endpoint even when no Session is connected.

    :  Durable endpoints can only be used with a physical event broker when it has an Assured Delivery Blade (ADB) installed and Guaranteed Messaging and message spooling enabled. For information configuring an event broker for Guaranteed Messaging, refer to Guaranteed Messaging.

  • Temporary endpoints are created by the client in a Session and last for the duration of the Session. When a Session is closed, temporary endpoints and their messages are deleted. On graceful closure of a client Session, temporary endpoints are deleted immediately. On other closures (for example, when switching to a redundant event broker or a connection failure), temporary endpoints are maintained for a period of sixty seconds to allow the reestablishment of the Session.