You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by phil brown <pb...@medata.com> on 2020/03/05 20:50:08 UTC

Best way to drain queues for maint?

Hi,
im new to apache MQ, and trying to figure out best practices for disruptive
maintenance.
HAproxy has a "drain" setting for its servers. I'm wondering if mqueue has
something similar?

We have an mqueue that gets hit by a lot of different things.
I'm tryhing to figure out the best way to shut it down, and upgrade the
version.
Ideally I'd want no messages in the queue while I do this. I dont want any
messages getting lost during the upgrade process.. especially if I mess
things up somewhere.

We deal with medical billing, so we really really dont want to lose any
messages. It will also be challenging to tell all the things pointing to it,
to just stop sending.

Ideally we want to be able to say, "process what you have, but dont accept
any new messages.".

and then I need a good way of knowing it's all done




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

Re: Best way to drain queues for maint?

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Obviously I’m talking about ActiveMQ (not Artemis).

Regards
JB

> Le 5 mars 2020 à 22:14, Jean-Baptiste Onofre <jb...@nanthrax.net> a écrit :
> 
> Hi Phil,
> 
> Your clients can use failover:broker1,broker2 that automatically deal with multi-brokers connection.
> 
> You can setup master/slave (there is an unique master at a time (active) and you can have several slaves (inactive, becoming master if master fails)).
> 
> So, basically, here’s the scenario:
> 
> - you have master/slave and your clients use failover:(master,slave)
> - you shutdown master, the slave becomes the "new" master
> - you upgrade your master (changing version, configuration, whatever)
> - you start the "old" master (now slave)
> - you shutdown the "new" master (the "old" master is the master again)
> - you upgrade the slave and restart it
> 
> You have the guarantee to not loose messages.
> 
> Network of brokers is another option but you might loose the pending messages located on one broker (before these messages have been forwarded to another broker).
> 
> Let me know if you need help to setup this.
> 
> Regards
> JB
> 
>> Le 5 mars 2020 à 21:50, phil brown <pb...@medata.com> a écrit :
>> 
>> Hi,
>> im new to apache MQ, and trying to figure out best practices for disruptive
>> maintenance.
>> HAproxy has a "drain" setting for its servers. I'm wondering if mqueue has
>> something similar?
>> 
>> We have an mqueue that gets hit by a lot of different things.
>> I'm tryhing to figure out the best way to shut it down, and upgrade the
>> version.
>> Ideally I'd want no messages in the queue while I do this. I dont want any
>> messages getting lost during the upgrade process.. especially if I mess
>> things up somewhere.
>> 
>> We deal with medical billing, so we really really dont want to lose any
>> messages. It will also be challenging to tell all the things pointing to it,
>> to just stop sending.
>> 
>> Ideally we want to be able to say, "process what you have, but dont accept
>> any new messages.".
>> 
>> and then I need a good way of knowing it's all done
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
> 


Re: Best way to drain queues for maint?

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Phil,

Your clients can use failover:broker1,broker2 that automatically deal with multi-brokers connection.

You can setup master/slave (there is an unique master at a time (active) and you can have several slaves (inactive, becoming master if master fails)).

So, basically, here’s the scenario:

- you have master/slave and your clients use failover:(master,slave)
- you shutdown master, the slave becomes the "new" master
- you upgrade your master (changing version, configuration, whatever)
- you start the "old" master (now slave)
- you shutdown the "new" master (the "old" master is the master again)
- you upgrade the slave and restart it

You have the guarantee to not loose messages.

Network of brokers is another option but you might loose the pending messages located on one broker (before these messages have been forwarded to another broker).

Let me know if you need help to setup this.

Regards
JB

> Le 5 mars 2020 à 21:50, phil brown <pb...@medata.com> a écrit :
> 
> Hi,
> im new to apache MQ, and trying to figure out best practices for disruptive
> maintenance.
> HAproxy has a "drain" setting for its servers. I'm wondering if mqueue has
> something similar?
> 
> We have an mqueue that gets hit by a lot of different things.
> I'm tryhing to figure out the best way to shut it down, and upgrade the
> version.
> Ideally I'd want no messages in the queue while I do this. I dont want any
> messages getting lost during the upgrade process.. especially if I mess
> things up somewhere.
> 
> We deal with medical billing, so we really really dont want to lose any
> messages. It will also be challenging to tell all the things pointing to it,
> to just stop sending.
> 
> Ideally we want to be able to say, "process what you have, but dont accept
> any new messages.".
> 
> and then I need a good way of knowing it's all done
> 
> 
> 
> 
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html


Re: Best way to drain queues for maint?

Posted by phil brown <pb...@medata.com>.
PS:
Not only do we have both...

but I also am trying to put together a plan to safely upgrade a
single-instance mqueue, to  artemis.
That's actually what triggered my initial question here



phil brown wrote
> It would be good to know for both mqueue and artemis
> We have both.
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html





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

Re: Best way to drain queues for maint?

Posted by phil brown <pb...@medata.com>.
It would be good to know for both mqueue and artemis
We have both.





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

Re: Best way to drain queues for maint?

Posted by Justin Bertram <jb...@apache.org>.
Are you asking about ActiveMQ 5.x or ActiveMQ Artemis?


Justin

On Thu, Mar 5, 2020 at 3:02 PM phil brown <pb...@medata.com> wrote:

> Hi,
> im new to apache MQ, and trying to figure out best practices for disruptive
> maintenance.
> HAproxy has a "drain" setting for its servers. I'm wondering if mqueue has
> something similar?
>
> We have an mqueue that gets hit by a lot of different things.
> I'm tryhing to figure out the best way to shut it down, and upgrade the
> version.
> Ideally I'd want no messages in the queue while I do this. I dont want any
> messages getting lost during the upgrade process.. especially if I mess
> things up somewhere.
>
> We deal with medical billing, so we really really dont want to lose any
> messages. It will also be challenging to tell all the things pointing to
> it,
> to just stop sending.
>
> Ideally we want to be able to say, "process what you have, but dont accept
> any new messages.".
>
> and then I need a good way of knowing it's all done
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
>