[Artemis] Remove queues with wildcard

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Artemis] Remove queues with wildcard

Raul Valdoleiros
Hi,

I've the following scenario:

   - Wildcard configuration active
   - Some subscribers to a queue like "+/example/+"
   - Subscribers of queues like "1/example/1" or "2/example/1"
   - Publishers to queues like "1/example/2"
   - Two brokers connected in a dynamic cluster

I got the following error: AMQ224037: cluster connection Failed to handle
message: java.lang.IllegalStateException: Cannot find binding for
paho/3931EE3876A1F5FFEA.0.2/example/E7718C0BF5D32769791b5e173b-0b45-11e8-9a05-0021f6b39ad7
The impact is the clients are disconnected and I my service stops.

I tried to create a unit test for it:
https://github.com/Skiler/activemq-artemis/commit/195305031bd1b01d4ffa64a9370efceea41177e2

The error is the same but use doesn't seem to be the same.

I added a entry log
in ClusterConnectionImpl$MessageFlowRecordImpl.removeBinding and got the
following log.

[main] 16:37:47,045 INFO
[org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl]
#################Remove
7f00000196cc5a7dce5a.teste/1/some/18e3a6d92-0db7-11e8-be55-024285a49c96
[Thread-13 (ActiveMQ-client-global-threads)] 16:37:47,064 INFO
[org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl]
#################Remove
7f00000196cc5a7dce5a.teste/1/some/18e3a6d92-0db7-11e8-be55-024285a49c96
[Thread-13 (ActiveMQ-client-global-threads)] 16:37:47,075 ERROR
[org.apache.activemq.artemis.core.server] AMQ224037: cluster connection
Failed to handle message: java.lang.IllegalStateException: Cannot find
binding for queue
7f00000196cc5a7dce5a.teste/1/some/18e3a6d92-0db7-11e8-be55-024285a49c96
at
org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl$MessageFlowRecordImpl.removeBinding(ClusterConnectionImpl.java:1259)
[:]

So my interpretation is the message for removing the queue is sent twice. I
think the best solution is ignore the action to remove the queue when the
queue doesn't exists, instead of guarantee that only one remove event is
sent.

This solution will make artemis more resilient, it will continue working
even when some inconsistency in the system happens.

I want to know what you think about it, and after that I'm available to fix
the problem.

Thanks,
Raul