You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ldebello <lu...@hotmail.com> on 2019/12/16 20:16:36 UTC

Message Group Behaviour

Hi,

I am trying to use message group and I think I am facing an issue, but I
would like to confirm before trying to fix it.

Scenario:

Artemis 2.9.0 Cluster (2 Nodes)

Queue: State (LVQ: true, Durable: Yes)

Consumer 1 --> Broker 1
Consumer 2 --> Broker 2

Producer Send Message to Broker 1: Message (Value: 1, _AMQ_LVQ_NAME: Same,
_AMQ_GROUP_ID: Same)

Consumer 1 Start Processing Message 1 (Auto ACK)
Consumer 1 waits 30 seconds

Producer Send Message to Broker 1: Message (Value: 2, _AMQ_LVQ_NAME: Same,
_AMQ_GROUP_ID: Same)

Consumer 2 Start Processing Message 2

I was expecting Message 2 to be consume by Broker 1, because both message
are in the same broker using the same group. My next test will be tests this
sending Message 2 to Broker 2 directly, but this very use case seems broken.

Is my understanding correct?

Thanks & Regards,
Luis






--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Message Group Behaviour

Posted by ldebello <lu...@hotmail.com>.
I continue testing the message group functionality but I am not sure if I am
missing something because I was not able to rebalance groups. I tried using
address-settings(default-group-rebalance), manually invoking resetAllGroups
and using "?group-rebalance=true".

Scenario:

Artemis 2.9.0 - 2 Nodes - Cluster UDP

Queue: State (LVQ: Yes, Durable: Yes, Rebalance: Yes)

Consumer 1 Broker 1
Consumer 2 Broker 2

Producer Send Message to Broker 1: Message (Content: 1, _AMQ_GROUP_ID: Same,
_AMQ_LVQ_NAME: Same)
Consumer 1 got: Message (Content: 1, _AMQ_GROUP_ID: Same, _AMQ_LVQ_NAME:
Same)
Consumer 1 waits 60 seconds
Producer Send Message to Broker 1: Message (Content: 2, _AMQ_GROUP_ID: Same,
_AMQ_LVQ_NAME: Same)
Producer Send Message to Broker 1: Message (Content: 3, _AMQ_GROUP_ID: Same,
_AMQ_LVQ_NAME: Same)
Consumer 1 got: Message (Content: 2, _AMQ_GROUP_ID: Same, _AMQ_LVQ_NAME:
Same)
Consumer 1 finish.
Consumer 2 finish (without consuming anything)

Consumer 2 Broker 2 --> It does not get any message, I was expecting group
to be rebalance and consumer messages in broker 2.

If I connect "Consumer 1 Broker 1" I got the remaining "Message (Content: 3,
_AMQ_GROUP_ID: Same, _AMQ_LVQ_NAME: Same)"

Is this the correct behavior and I am getting wrong the definition of
rebalance groups?

Thanks,
Luis




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Message Group Behaviour

Posted by ldebello <lu...@hotmail.com>.
Justin, thanks for all your answers. 

Your are right I didn't reply your question regarding performance
benchmarks. I do not have real performance benchmarks just reviewing our
architecture, I totally understand your point regarding using a single
broker, I am just looking for different ways of scaling in case of needing
and as a learning process, because is ok going with a single broker (knowing
that in the future I will not able to scale out if needed).

We have several pieces in our architecture and just one of them needs the
message group functionality to ensure a serial processing for a specific
group of messages.

Regards,
Luis



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Message Group Behaviour

Posted by Justin Bertram <jb...@apache.org>.
If you're going to be using message grouping in a cluster then you'll
definitely want to configure it properly (i.e. according to the
documentation you cited). That said, message grouping imposes a natural
penalty on performance due to the serialization of message consumption per
group. Generally speaking this flies in the face of clustering which is
designed to increase message throughput. In other words, if you're grouping
messages there's a good chance you can get the performance you need from a
single broker. This is similar to the "global ordering" issue we discussed
on an earlier thread.

Did you run performance benchmarks to determine you needed to cluster in
order to achieve your performance goals? I asked this on a previous thread
but didn't receive a response.


Justin

On Mon, Dec 16, 2019 at 2:32 PM ldebello <lu...@hotmail.com> wrote:

> After reading the documentation in more detail
> "
> https://activemq.apache.org/components/artemis/documentation/latest/message-grouping.html
> "
> it seems that I need to use "Clustered Grouping" for this use case.
>
> I will try that
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
>

Re: Message Group Behaviour

Posted by ldebello <lu...@hotmail.com>.
After reading the documentation in more detail
"https://activemq.apache.org/components/artemis/documentation/latest/message-grouping.html"
it seems that I need to use "Clustered Grouping" for this use case.

I will try that



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html