Topic Matching and Message Delivery Modes

When the Solace Messaging Platform using Guaranteed Messaging receives messages published to a topic, it can automatically change the delivery mode of the messages to accommodate the persistence requirements of an endpoint or a client subscription when there is a topic match.

An example of this is if a client publishes a Direct message to a topic that matches the topic subscription set for an endpoint. An endpoint (either a queue that has a topic subscription added to it or a topic endpoint) can only accept non‑persistent and persistent messages; therefore, the platform will change the message delivery mode to non-persistent so that the endpoint can receive the message with the matching topic. When a client publishes a message as Direct, the message is not acknowledged back to the client. However, when the message’s delivery mode is changed to non‑persistent and is spooled to the endpoint, the message then acts as a Guaranteed message, and an acknowledgment from the receiving client is provided to the router (that is, it is guaranteed to make it to a client bound to the endpoint).

Alternately, if the router receives a persistent message published to a topic, it delivers the message to any endpoints that have matching topic subscriptions. However, because topic subscriptions registered for individual clients are for Direct messages, the router can change the message’s delivery mode to Direct and send it to those clients with matching topic subscriptions. In this scenario, because the client published the message as persistent, the message is acknowledged back to the publishing client.

The table below lists how messages’ delivery modes can be changed for endpoints with matching topics.

Possible Message Delivery Mode Changes When Topics Match

Delivery Mode of Published Message

Received by Endpoint with a Matching Topic Subscription as...

Received by Consumer as...

Direct

Non-Persistent

Direct

Non-Persistent

Non-Persistent

Direct

Persistent

Persistent

Direct