Enabling No Local Delivery for a Session

The No Local Session property only affects the delivery of Direct messages to the client on the same Session that the messages were published on. It does not affect the delivery of Guaranteed messages.

The No Local property can also be enabled for a Flow. When enabled at the Flow level, the No Local Flow property affects the delivery of Non‑Persistent or Persistent messages on a Flow that is created in the same Session that the messages were published on. The delivery of Direct messages is not affected by the No Local Flow property. (For more information about setting the No Local property on a Flow, refer to No Local Delivery.)

When the No Local property is enabled only for the Session or only for the Flow, it is possible for the event broker to change the delivery mode of a published message so that it could still be delivered to its publishing client. For example, if a client publishes a message to Topic “A”, the message cannot be delivered as a Direct message to that client when No Local is enabled for the Session, but if No Local is not enabled for a Flow bound to a Topic Endpoint with the Topic subscription “A”, the message could be delivered to that client on the Flow as a Non-Persistent message. For information on how a message’s delivery mode can be changed based on a Topic match, refer to Topic Matching and Message Delivery Modes.

To Enable No Local Delivery for a Session

PubSub+ Messaging API Use

JCSMP

JCSMPProperties.NO_LOCAL

Java RTO

SessionHandle.PROPERTIES.NO_LOCAL

C

SOLCLIENT_SESSION_PROP_NO_LOCAL

.NET

SessionProperties.NoLocal

JavaScript and Node.js

solace.SessionProperties.noLocal

Related Samples

For an example of how to enable the No Local Session property, refer to the NoLocalPubSub sample for the appropriate messaging API.