oceansize
oceansize

Reputation: 731

ActiveMQ Message Groups Consumers Cache

As I understand in order for message groups to work - all consumers should be cached (reused). Otherwise how a broker will guarantee the message order for the same group?

While it seems obvious (or maybe my understanding is incorrect) I didn't find any confirmation for that in the official documentation.

Could someone either confirm/deny that?

Thanks in advance,

Upvotes: 0

Views: 98

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 35152

There is no strict need to cache/reuse consumers. The broker guarantees the order of messages in the same group by ensuring that the messages not consumed concurrently. Even if one consumer starts receiving messages in the group but closes before the entire group is consumed the broker will select another consumer and ultimately the messages will be consumed serially (i.e. not concurrently) which means their order will be preserved.

Upvotes: 2

Related Questions