bloomberg / amqpprox

An AMQP 0.9.1 proxy server, designed for use in front of an AMQP 0.9.1 compliant message queue broker such as RabbitMQ.
Apache License 2.0
78 stars 16 forks source link

What's the use of PAUSE a vhost? #66

Closed bechampion closed 2 years ago

bechampion commented 2 years ago

As far as i notice the clients start loosing HB frames until they disconnect , what i was able to replicate is PAUSING/UNPAUSING quick enough within the HB Interval configured on the clients (and hopefully loosing 1 of the 2 HB frames within the interval) will not disconnect the client.

I wonder what's the function of PAUSING ? also i tried PAUSING ->REMAPPING -> UNPAUSING , but still my client ends up going to the same rabbitmq server until i reconnect.

Thank you!

adamncasey commented 2 years ago

Hey @bechampion . It's a good question, and your observations around heartbeats align with what we see.

The aim of pausing is to support a stateful vhost migration from one broker to another. By pausing the vhost & forcing the clients to disconnect you can stabilise the state of the vhost, which makes the process of migrating to another broker possible / a lot simpler.

Once the vhost has been remapped you need to force disconnect the clients to ensure they're forwarded to the correct broker.

The exact technique is described in the middle of this talk: https://youtu.be/b2hQ8glQyhs - somewhere around the 13minute mark

adamncasey commented 2 years ago

Sorry hit close with comment a bit early there - I updated the above comment - let me know if this helps

bechampion commented 2 years ago

It does help a lot , thank you so much.

willhoy commented 2 years ago

Marking closed