Oooh, maybe I answered my own question:
https://activemq.apache.org/components/artemis/documentation/1.0.0/message-grouping.html
This looks like what I’m after.  Any advice around its use?

John





[rg] <https://www.redpointglobal.com/>

John Lilley

Data Management Chief Architect, Redpoint Global Inc.

34 Washington Street, Suite 205 Wellesley Hills, MA 02481

M: +1 7209385761<tel:+1%207209385761> | 
john.lil...@redpointglobal.com<mailto:john.lil...@redpointglobal.com>
From: John Lilley <john.lil...@redpointglobal.com.INVALID>
Sent: Thursday, December 7, 2023 11:58 AM
To: users@activemq.apache.org
Subject: Is it possible to route message to a specific consumer?

*** [Caution] This email is from an external source. Please use caution 
responding, opening attachments or clicking embedded links. ***

Greetings,

We are in the process of transforming our Java-based services into 
Kubernetes-based microservice swarms with HA topology.  So every service will 
have multiple instances.  The good news is, AMQ supports this splendidly, 
because the message broker is very good about load-balancing between consumers 
and handling failed consumers.

However, we have a few cases of “long running tasks” that a single service 
instance is responsible for.  In those cases, we need to be able to route a 
request to a specific consumer instance.  We could use specially-named queues 
for each consumer instance, but this seems awkward and hopefully not necessary.

Is there any kind of “consumer affinity” that can be attached to a message, 
which directs the broker to select a specific consumer?
If not, other ideas are certainly welcome.

We are using OpenJDK 17

This is our maven dependency
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>artemis-jms-client-all</artifactId>
    <version>2.30.0</version>
</dependency>


Thanks
John



[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,PCllWqn1FN806xiChO-uNijPVawTv9Y3krF28r_sBUJsVHuM4SlcKCNVMTp_Qq94AnDC39XAs-pcWHhVnAPvZZRJbL8kXpIdP0TQ85wOYAroxX0px-0h_pKn&typo=1>

John Lilley

Data Management Chief Architect, Redpoint Global Inc.

34 Washington Street, Suite 205 Wellesley Hills, MA 02481

M: +1 7209385761<tel:+1%207209385761> | 
john.lil...@redpointglobal.com<mailto:john.lil...@redpointglobal.com>

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential 
and is intended solely for the use of the individual(s) to whom it is 
addressed. If you believe you received this e-mail in error, please notify the 
sender immediately, delete the e-mail from your computer and do not copy, print 
or disclose it to anyone else. If you properly received this e-mail as a 
customer, partner or vendor of Redpoint, you should maintain its contents in 
confidence subject to the terms and conditions of your agreement(s) with 
Redpoint.

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential 
and is intended solely for the use of the individual(s) to whom it is 
addressed. If you believe you received this e-mail in error, please notify the 
sender immediately, delete the e-mail from your computer and do not copy, print 
or disclose it to anyone else. If you properly received this e-mail as a 
customer, partner or vendor of Redpoint, you should maintain its contents in 
confidence subject to the terms and conditions of your agreement(s) with 
Redpoint.

Reply via email to