Message Transport Modes

The Solace JMS implementation allows clients to use either a Guaranteed Transport or Direct Transport mode to send and receive JMS messages. These transport modes allow JMS clients to utilize either the Guaranteed Messaging or Direct Messaging capabilities of the event broker, and they offer different message qualities of service for Non‑Persistent messages.

The transport mode to use is determined by whether the Direct Transport message delivery property in the JNDI Connection Factory (refer to Direct Transport) is enabled or not. By default, the Direct Transport mode is enabled. To use Guaranteed Transport mode, the Direct Transport property must be set to false in the JNDI Connection Factory.

Guaranteed Transport Mode

The Guaranteed Transport mode uses the Guaranteed Messaging capabilities of the event broker. This transport mode can be used with an event broker that has an ADB installed with Guaranteed Messaging and message spooling enabled.

Guaranteed Transport uses the following means to prevent Non‑Persistent or Persistent messages from being lost:

  • Queues or topic endpoints (which are used to support durable subscription names) from which messages can be delivered to and consumed from are provisioned on the event broker. These endpoints are durable; that is, they have life spans independent of any particular client Session, and messages can accumulate on a durable endpoint even when no Session is connected.

    Durable endpoints can be provisioned using SolAdmin or the CLI (refer to Solace JNDI Objects). In addition, if the Dynamic Durables API property is enabled, when the Session.createDurableSubscriber() or Session.createQueue() methods are called, corresponding durable topic endpoints or queues are automatically provisioned on the event broker (refer to Dynamic Durables).

  • The delivery of messages from Producers to durable queues or subscriptions on the event broker is guaranteed by a message acknowledgment process. (For detailed information on this process, refer to Guaranteed Messages.)
  • When JMS messages are received by the event broker, they are maintained in a non‑volatile store until the messages are consumed or for the lifespan of the durable queue or subscription. If a consuming client disconnects, stored messages can be consumed when the client reconnects. This ensures that messages are not lost if the consumer briefly disconnects from the event broker or an activity switch occurs between redundant event brokers in a failover scenario.

    As a result of the message acknowledgment and spooling, Guaranteed Transport provides increased reliability, but the performance of handling Non-Persistent messages is not as high as when Direct Transport is used to handle Non-Persistent messages.

    Guaranteed Transport must be used for the delivery of Persistent messages to the event broker and from durable subscriptions and queues to consumers.

Direct Transport Mode

Clients that connect to an event broker can use Direct Transport mode to publish Non-Persistent messages and to consume Non‑Persistent messages.

The Direct Transport mode uses the Direct Messaging capabilities of the event broker, so it provides the highest possible message delivery performance because the Non‑Persistent messages are not guaranteed. That is, when Direct Transport is used, the Non‑Persistent messages that are received are not acknowledged, and the event broker does not spool those messages for consumers. These messages can be discarded when congestion or system failures are encountered or when a consuming client is not connected.

When clients use Direct Transport to publish Non‑Persistent messages, the event broker does not have to have an ADB installed and Guaranteed Messaging and message spooling enabled. However, when using this mode to publish Persistent messages, the event broker does have to have an ADB installed and Guaranteed Messaging and message spooling enabled, otherwise any Persistent messages that are published will be rejected.

:  When Direct Transport is used, Persistent messages that are published or consumed are still handled in the same manner as if Guaranteed Transport was used (that is, the event broker still performs message acknowledgment and spooling). All guaranteed consumers receive Persistent messages if published as Persistent. They'll receive Non-persistent messages, if published as Non-persistent or if it's Direct and gets promoted to Non-persistent. Conversely, all Direct consumers always receive Direct messages.

For more information on Direct Transport mode and some feature interactions that should be considered when designing applications, refer to Direct Transport Behavior.

Supported Message Types and Transport Modes

The message types and transport modes that are supported by an event broker depends on whether it has an ADB installed and Guaranteed Messaging and message spooling enabled.

Supported Message Types and Transport Modes

Is ADB installed, Guaranteed Messaging and message spooling enabled?

Supported Message Type and Transport Modes

Yes

  • Persistent with Guaranteed Transport
  • Non‑Persistent with Guaranteed Transport
  • Non-Persistent with Direct Transport

No

  • Non-Persistent with Direct Transport