You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jérôme Barotin <jb...@s4e.fr> on 2020/04/15 15:57:35 UTC
Same message sent to different consumer
Hi,
I'm back with a new question about ActiveMQ :)
My configuration is the following :
* Message Group enabled with 5000 different groups
* 2 ActiveMQ brokers installed in a Network of Broker with KahaDb
persistence enabled
* I consume these message thought the Spring's
DefaultMessageListenerContainer & the ActiveMQ's
PooledConnectionFactory though 5 JVM instance with 15 thread each
I've got an issue that appear sometime and randomly, here a description
below :
* Let's defined Consumer1 a consuming thread that own a message group
(Group1) that have for example an average time of 30s to consume a
message (for information, other groups took 5s in average time to
consume a message and have less messages sended).
* Consumer1 had consumed some message of Group1 (let's say about 50),
It receives a new Group1's message (Message1), and then begin to
consume it.
* But, the same Message1 is sent on an other consumer thread
(Consumer2), and then Group1 is relocated on Consumer2 (because all
next Group1's message, will be consumed by Consumer2).
This is annoying, because I don't want to have Message1 consumed at the
same time Consumer1 and Consumer2. It's hard to replay because, it
happened randomly.
Have you got an idea about what could generate this comportment and how
to change it ?
Best,
Jérôme
Re: Same message sent to different consumer
Posted by Jérôme Barotin <jb...@s4e.fr>.
Hi,
I added this to my queue policy :
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="-1"/>
</pendingMessageLimitStrategy>
It seems to fix my issue.
Could you help me understand why ?
Le 15/04/2020 à 17:57, Jérôme Barotin a écrit :
>
> Hi,
>
> I'm back with a new question about ActiveMQ :)
>
> My configuration is the following :
>
> * Message Group enabled with 5000 different groups
> * 2 ActiveMQ brokers installed in a Network of Broker with KahaDb
> persistence enabled
> * I consume these message thought the Spring's
> DefaultMessageListenerContainer & the ActiveMQ's
> PooledConnectionFactory though 5 JVM instance with 15 thread each
>
> I've got an issue that appear sometime and randomly, here a
> description below :
>
> * Let's defined Consumer1 a consuming thread that own a message
> group (Group1) that have for example an average time of 30s to
> consume a message (for information, other groups took 5s in
> average time to consume a message and have less messages sended).
> * Consumer1 had consumed some message of Group1 (let's say about
> 50), It receives a new Group1's message (Message1), and then begin
> to consume it.
> * But, the same Message1 is sent on an other consumer thread
> (Consumer2), and then Group1 is relocated on Consumer2 (because
> all next Group1's message, will be consumed by Consumer2).
>
> This is annoying, because I don't want to have Message1 consumed at
> the same time Consumer1 and Consumer2. It's hard to replay because, it
> happened randomly.
>
> Have you got an idea about what could generate this comportment and
> how to change it ?
>
> Best,
>
> Jérôme
>
--
*Jérome Barotin*
Devops
+33 2 90 38 06 70
*S4E*
Batiment Océan Développement
9 rue d'estienne d'orves - 56100 Lorient
http://www.s4e.fr