简体   繁体   English

同步处理特定属性组的jms消息,但同时处理其他组

[英]Process jms message synchronously for a specific property group but concurrently among other groups

I need help on JMS queue and message processing. 我需要有关JMS队列和消息处理的帮助。

I have a scenario where messages needs to be processed synchronously for a specific property group, but can be done concurrently among different property groups. 我有一个场景,其中消息需要针对特定​​属性组进行同步处理,但可以在不同属性组之间同时进行。

I got some knowledge on message group and queues specific to each property. 我对消息组和特定于每个属性的队列有一些了解。 My thinking is, I want to do synchronous processing specific to a property group and there could be 7000 or more property group as such. 我的想法是,我想对某个属性组进行特定的同步处理,因此可能会有7000个或更多的属性组。

Definitely i cannot have 7000 queues. 绝对不能有7000个队列。 Please provide any suggestions. 请提供任何建议。

Thanks 谢谢

Concept of queue and message groups in ActiveMQ will serve the purpose. ActiveMQ中的队列和消息组的概念将达到目的。

Each incoming jms message should be set with header "JMSXGroupID". 每个传入的jms消息都应设置标头“ JMSXGroupID”。 The value for the header should be specific to the group. 标头的值应特定于该组。

Now, concurrent consumers can listen to the queue. 现在,并发使用者可以收听队列。 ActiveMQ will make sure, message with same group header value, will be sent to same consumer. ActiveMQ将确保具有相同组头值的消息将发送给相同的使用者。

Refer to: http://activemq.apache.org/message-groups.html 请参阅: http : //activemq.apache.org/message-groups.html

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM