You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by francesco81 <Fr...@bticino.it> on 2017/06/05 08:13:38 UTC

Re: ARTEMIS - java.lang.NullPointerException switching subscription with #

Hi, just an update.
We found out that there was a client subscribed to the incriminated topic
with a double wildcard char: "/prj/plantid/+/gwid/+/connection_state". So,
there is a step 0 to add to the ones in my previous post: "0) connect a
client and subscribe the topic /prj/plantid/+/gwid/+/connection_state". It
seems that it breaks something somewhere.
When, in a second moment, I subscribe the punctual topic
"/prj/plantid/111111/gwid/22222/connection_state" and the generic one
"/prj/plantid/111111/gwid/22222/#", after the disconnection it is no more
possible to subscribe the specific one. 
It seems like the unsubscribe method doesn't free the "link" between the
punctual address and the generic one. Thus, any following subscribe event to
the punctual topic throws a nullPointer exception.

Is it possible that something is wrong in the "WildcardAddressManager.java"
class, for methods "private synchronized void
removeAndUpdateAddressMap(final Address address) throws Exception" and
"public boolean addBinding(final Binding binding) throws Exception"?

Francesco



--
View this message in context: http://activemq.2283324.n4.nabble.com/ARTEMIS-java-lang-NullPointerException-switching-subscription-with-tp4726641p4727006.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ARTEMIS - java.lang.NullPointerException switching subscription with #

Posted by francesco81 <Fr...@bticino.it>.
Attached you can find a junit to replicate the issue.
Cheers.

Francesco

PahoMQTTWildcardTest.java
<http://activemq.2283324.n4.nabble.com/file/n4727140/PahoMQTTWildcardTest.java>  



--
View this message in context: http://activemq.2283324.n4.nabble.com/ARTEMIS-java-lang-NullPointerException-switching-subscription-with-tp4726641p4727140.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.