Here's what was happening when redistribution was disabled: 1) Message is sent to artemis.node.1 2) Message stays on artemis.node.1 because there are no consumers on any node in the cluster and because 1 message isn't enough to trigger round-robin message load-balancing (assuming it's enabled) 3) You start STOMP consumer A on artemis.node.2 4) Message stays on artemis.node.1 because redistribution is disabled 5) You start STOMP consumer B on artemis.node.1 6) Consumer B receives the message 7) You stop consumer B on artemis.node.1 and send another message from producer to artemis.node.1 8) Since a consumer (i.e. A) is registered on artemis.node.2 the message is forwarded to it
Enabling redistribution changes the behavior at step 4 so the consumer is able to receive the message. I'm glad everything is working for you now. Justin ----- Original Message ----- From: "Maciej Gałkowski" <maciejgalkow...@gmail.com> To: users@activemq.apache.org Sent: Thursday, January 5, 2017 9:55:08 AM Subject: Re: Artemis 1.5.1 clustered consumer not receiving messages in specific circumstances Damn, you are right. I did confuse <redelivery-delay> and <redistribution-delay> I had explicitly set <redelivery-delay>0</redelivery-delay>, and while this is correct setting for my use case, i ovelooked that <redistribution-delay> is by default set to -1. Thank you very much for the quick reply. I just verified that enabling redistribution fixes the problem. 2017-01-05 15:41 GMT+00:00 Justin Bertram <jbert...@apache.com>: > Can you provide your broker configuration? It sounds to me like you don't > have message redistribution enabled. > > What happens if you start the STOMP consumer on artemis.node.2 and then > send a message to artemis.node.1? > > > Justin > > ----- Original Message ----- > From: "Maciej Gałkowski" <maciejgalkow...@gmail.com> > To: users@activemq.apache.org > Sent: Thursday, January 5, 2017 9:31:34 AM > Subject: Artemis 1.5.1 clustered consumer not receiving messages in > specific circumstances > > I have set up a two node Artemis 1.5.1 cluster, precreated a persistent > queue (jms.queue.testqueue) on both nodes. > > Starting both instances, they form a cluster. > 1.Using STOMP protocol I send a message to the aretmis.node.1 > 2. I start STOMP consumer on artemis.node.2, not receiving anything > 3. I start STOMP consumer on artemis.node.1, and receive the message I just > sent > 4. I stop consumer on artemis.node.1 and send another message from producer > to artemis.node.1 > 5. The consumer on artemis.node.2 is receiving the message. > > My question is: > Why, while having a consumer for the queue on node2, and a message sent to > node1, the consumer is not receiving anything. The messages to the > consumer2 are forwarded, only when I first register a consumer for the > queue on node1. > > This looks like a bug to me, but I would like to confirm it here first. > > Regards, > Maciej >