jsr343-experts@jms-spec.java.net

[jsr343-experts] (JMS_SPEC-65) Clarify use of NoLocal arg when using createDurableSubscriber

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Thu, 22 Dec 2011 15:40:07 +0000

I have logged the following issue:
http://java.net/jira/browse/JMS_SPEC-65

This issue relates to the following method on {{javax.jms.Session}}:

TopicSubscriber createDurableSubscriber(Topic topic,
                                         java.lang.String name,
                                         java.lang.String messageSelector,
                                         boolean noLocal)
                                         throws JMSException

What does noLocal mean in this context? The javadoc states that this method "Creates a durable subscriber to the
specified topic, using a message selector and specifying whether messages published by its own connection should be
delivered to it". However it is ambiguous whether "it" refers to the durable subscription in the JMS provider or the
TopicSubscriber object.

Does noLocal mean
(1) that messages published by this connection should not be added to the durable subscription, or that
(2) messages published by this connection should not be delivered to this particular {{TopicSubscriber}}? These do not
mean the same thing, since in the latter case the messages might be saved in the subscription and delivered at some
later stage.

This should be clarified.

The suggested interpretation is that it means (1): that messages published by its own connection should not be added to
the durable subscription.

Comments please. If your own JMS implementation interprets this differently please say so.

Thanks,

Nigel