Maintain kahaDB state between two broker

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Maintain kahaDB state between two broker

khandelwalanuj
This post was updated on .
Using ActiveMQ 5.8.

Problem: I want to maintain kahaDB state while switching ActiveMQ broker from one filer to another.

Description: I am running ActiveMQ broker on a machine and having all kahaDB in a directory. I have a use case where I want to switch my broker from this system to another system where kahaDB logs will be stored in a new directory.
My requirement is to synchronize these logs. I don;t want to loose any message. How should I achieve this ?

PS:
I can synchronized kahadb logs from the old site to the new site and bring up a broker with the sync'ed kahadb. But, since there would be a few minutes window between each sync operation, a message sent, delivered and acknowledged at the old site could be sent again at the new site if kahadb was synced before the message was acknowledged. This might lead to some applications receiving a message twice leaving them in an inconsistent state.

Thanks,
Anuj

Reply | Threaded
Open this post in threaded view
|

Re: Maintain kahaDB state between two broker

ceposta
This won't help the current situation, but it might be a better
solution to separate the activemq data store to a shared storage, or
one that is not tied to the specific instance.

Given the config you're using, I suspect the most straight forward
path is to stop the broker, move the files, then restart it.

If you're trying to move the kahadb journals/index while in flight and
then cut over, not sure there's a good way to do that.

On Tue, May 6, 2014 at 12:29 AM, khandelwalanuj
<[hidden email]> wrote:

> Using ActiveMQ 5.8.
>
> Problem: I want to maintain kahaDB state while switching ActiveMQ broker
> from one filer to another.
>
> Description: I am running ActiveMQ broker on a machine and having all kahaDB
> in a directory. I have a use case where I want to switch my broker from this
> system to another system where kahaDB logs will be stored in a new
> directory.
> My requirement is to synchronize these logs. I don;t want to loose any
> message. How should I achieve this ?
>
> PS:
> I can synchronized kahadb logs from the old site to the new site and bring
> up a broker with the sync'ed kahadb. But, since there would be a few minutes
> window between each sync operation, a message sent, delivered and
> acknowledged at the primary site could be sent again at the new site if
> kahadb was synced before the message was acknowledged. This might lead to
> some applications receiving a message twice leaving them in an inconsistent
> state.
>
> Thanks,
> Anuj
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Maintain-kahaDB-state-between-two-broker-tp4680914.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta