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, see 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.