Is it possible to setup exclusive consumer

92 views
Skip to first unread message

Kajan Nallathamby

unread,
Sep 25, 2023, 6:41:17 PM9/25/23
to A gathering place for the Open Rail Data community
I'm trying to setup exclusive consumer and a couple of backup consumer if it goes down. But when I set this up, it does not seem to be doing anything as I'm getting events on all the consumers. 

stomp.SubscribeOpt.Header("activemq.exclusive", "true"),

Peter Hicks (Poggs)

unread,
Sep 26, 2023, 12:39:35 PM9/26/23
to A gathering place for the Open Rail Data community
Hi Kajan

On 25 Sep 2023, at 21:46, 'Kajan Nallathamby' via A gathering place for the Open Rail Data community <openrail...@googlegroups.com> wrote:

I'm trying to setup exclusive consumer and a couple of backup consumer if it goes down. But when I set this up, it does not seem to be doing anything as I'm getting events on all the consumers. 

stomp.SubscribeOpt.Header("activemq.exclusive", "true)

I don’t think we can help you unless we’ve got some more information on your setup!

1. What language and what client (and version) library are you using?
2. What are you setting on the connection and session/subscription options when you connect?
3. What is your end goal here?  It might be there’s a better way of you doing what you’re trying to do


Peter

Kajan Nallathamby

unread,
Sep 26, 2023, 1:14:08 PM9/26/23
to A gathering place for the Open Rail Data community
Hi Peter, 
Thanks for your response. Below are my answers to your questions.

1. language: golang, using stomp v3 library: https://pkg.go.dev/github.com/go-stomp/stomp/v3
2. We are creating a TCP connection to the https://opendata.nationalrail.co.uk/feeds on stomp using a client-id.
     - and subscribing to the feed: "/topic/darwin.pushport-v16" 
     - we are passing in the headers "activemq.subscriptionName" and "activemq.exclusive"
3. The end goal is that we have multiple servers that we would like to use, and want to use one server as the main exclusive server and if it goes down for any reason another server can pickup the events in the queue.

This is where I got the headers from https://activemq.apache.org/stomp

regards,

Reply all
Reply to author
Forward
0 new messages