Artemis - message delivery issue for topic with durable and non-durable subscriptions

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

Artemis - message delivery issue for topic with durable and non-durable subscriptions

This post was updated on .
Dear users,
I have a strange behaviour of Artemis, which does not deliver messages sometimes.

I have Artemis 1.2.0 and clients use STOMP. There is a topic with durable subscription and consumers are permanently connected. From time to time to the same topic connects one non-durable subscriber.

After some time of normal work I observed, that when non-durable client connects, first they both receive some small number  of messages, but then (couple seconds later) the durable one stops receiving any messages. So only non-durable receives messages until it disconnects.
After non-durable is disconnected none is receiving messages. The cycle repeats when non-durable connects again.

I took heapdumps and I'm trying to understand what's going wrong there, but so far could not find a clear answer.
From the first heapdump (both durable and non-durable subscribers are connected) I see, that topic has paging. All messages, which are published to the topic, go to the paging. At least I can see there messages published before I took the heapdump.
The second heapdump, which I took 10 minutes later after non-durable subscriber disconnected, I notice that PageStore in PageSubscription for the durable queue has different Page instance - first has page #594, second #596 (yes, plus two). The page in the latest heapdump has only messages published after disconnection of non-durable.
messageReferences and intermediateMessageReferences in both cases are empty.
PageCursor points to the page #419 and some messageNr, but current writing page is #594 in the first snapshot and #596 in the second. It looks like this cursor got stuck.

the performance of both consumers was on the good level - they both managed to consume messages almost instantly. So actually I don't think paging should start at all for the topic.

Do you have an idea what could lead to this situation? Why PageCursor got stuck on it's position and why depage does not happen?
I would appreciate in any help and ideas.