You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by norinos <ta...@gmail.com> on 2018/04/06 07:54:18 UTC

Shared File System Master Slave

I am planning to use Shared File System Master Slave.(I use AcitveMQ 5.13.1)
http://activemq.apache.org/shared-file-system-master-slave.html

With this system, even though master(#1)'s process goes down due to trouble, 
I think that ActiveMQ can be continuously used in slave(#2) process.

I have a question. 

http://activemq.apache.org/amq-message-store.html

According to the above documentation, MQ's memory cache periodically
inserted into the reference store(db.data).

If master(#1) goes down, memory cache cannot insert.
It seems that the reference sotre index does not match the Data Logs.

At this time, can #2(New master) start normally ?
If not, What kind of trouble will occur ?
For example, Subscribed messages will be subscribe agein.





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

Re: Shared File System Master Slave

Posted by Tim Bain <tb...@alumni.duke.edu>.
Yes, that information is applicable and gives a good overview of the
internals of KahaDB.

Tim

On Mon, Apr 9, 2018, 1:29 AM norinos <ta...@gmail.com> wrote:

> I found the following site. Is this helpful for me?
>
> http://www.idevnews.com/images/emailers/110127_ProgressFUSE/WhitePapers/ActiveMQinActionCH05.pdf
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: Shared File System Master Slave

Posted by norinos <ta...@gmail.com>.
Hi Tim ! thanks a lot.


> The documentation you linked to is for the AMQ message store, not the 
> KahaDB message store. So if you're using KahaDB as you say, then the page 
> you linked to is irrelevant. 

I finally understood that AMQ and KahaDB are different.

> KahaDB behaves as I described. You only risk losing messages that have not 
> yet been accepted (i.e. you don't risk losing anything). If I recall 
> correctly, the only thing that's flushed to disk periodically is the
> index, 
> and that can be rebuilt from the raw journal files so there's no risk of 
> data loss, just a slower broker startup. 

I feel relieved that it seems there is no risk.


I found the following site. Is this helpful for me?
http://www.idevnews.com/images/emailers/110127_ProgressFUSE/WhitePapers/ActiveMQinActionCH05.pdf





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

Re: Shared File System Master Slave

Posted by Tim Bain <tb...@alumni.duke.edu>.
The documentation you linked to is for the AMQ message store, not the
KahaDB message store. So if you're using KahaDB as you say, then the page
you linked to is irrelevant.

KahaDB behaves as I described. You only risk losing messages that have not
yet been accepted (i.e. you don't risk losing anything). If I recall
correctly, the only thing that's flushed to disk periodically is the index,
and that can be rebuilt from the raw journal files so there's no risk of
data loss, just a slower broker startup.

Tim

On Sun, Apr 8, 2018, 10:06 PM norinos <ta...@gmail.com> wrote:

> As you say, I'm using KahaDB.
>
> > You asked whether subscriptions would be on the new master, and the
> answer
> > depends on whether the subscription was durable. If it was a durable
> > subscription, the subscription information is persisted and the
> > subscription will be in the same state on the new master, even if the
> > client doesn't immediately reconnect. If the subscription is not durable,
> > then it will be recreated when the client reconnects to the new master,
> so
> > any messages that were unconsumed at the time the original master went
> > down
> > and any messages sent before the client reconnects will be lost for that
> > subscriber.
>
> I'm using durable subscription.
> So, I understand that clients can receive the message without problems
> when switching from master to slave.
>
>
> Please tell me a little more.
>
> ActiveMQ insert cache index into the reference store for performance at
> checkpoint interval.
>
> If master goes down, it seems that chache index can not insert.
> So reference store is not up-to-date.
>
> In this case, if I startup up ActiveMQ, Is the reference store updated at
> the start-up phase?
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: Shared File System Master Slave

Posted by norinos <ta...@gmail.com>.
As you say, I'm using KahaDB.

> You asked whether subscriptions would be on the new master, and the answer 
> depends on whether the subscription was durable. If it was a durable 
> subscription, the subscription information is persisted and the 
> subscription will be in the same state on the new master, even if the 
> client doesn't immediately reconnect. If the subscription is not durable, 
> then it will be recreated when the client reconnects to the new master, so 
> any messages that were unconsumed at the time the original master went
> down 
> and any messages sent before the client reconnects will be lost for that 
> subscriber.

I'm using durable subscription.
So, I understand that clients can receive the message without problems
when switching from master to slave.


Please tell me a little more.

ActiveMQ insert cache index into the reference store for performance at
checkpoint interval.

If master goes down, it seems that chache index can not insert.
So reference store is not up-to-date.

In this case, if I startup up ActiveMQ, Is the reference store updated at
the start-up phase?




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

Re: Shared File System Master Slave

Posted by Tim Bain <tb...@alumni.duke.edu>.
The AMQ store is not widely used these days. You'll probably be using the
KahaDB store: activemq.apache.org/kahadb.html

As you said, if there is any content that has not been flushed to disk, it
will be lost when the master goes down. However, unless you've manually
set enableJournalDiskSyncs to false, you're not going to lose any messages
whose receipt has been confirmed by the broker. (Any messages lost will be
messages the broker has not yet confirmed receipt of.)

When the slave broker attempts to become active, it will read the data
files and begin serving clients.

You asked whether subscriptions would be on the new master, and the answer
depends on whether the subscription was durable. If it was a durable
subscription, the subscription information is persisted and the
subscription will be in the same state on the new master, even if the
client doesn't immediately reconnect. If the subscription is not durable,
then it will be recreated when the client reconnects to the new master, so
any messages that were unconsumed at the time the original master went down
and any messages sent before the client reconnects will be lost for that
subscriber.

Tim

On Fri, Apr 6, 2018, 1:54 AM norinos <ta...@gmail.com> wrote:

> I am planning to use Shared File System Master Slave.(I use AcitveMQ
> 5.13.1)
> http://activemq.apache.org/shared-file-system-master-slave.html
>
> With this system, even though master(#1)'s process goes down due to
> trouble,
> I think that ActiveMQ can be continuously used in slave(#2) process.
>
> I have a question.
>
> http://activemq.apache.org/amq-message-store.html
>
> According to the above documentation, MQ's memory cache periodically
> inserted into the reference store(db.data).
>
> If master(#1) goes down, memory cache cannot insert.
> It seems that the reference sotre index does not match the Data Logs.
>
> At this time, can #2(New master) start normally ?
> If not, What kind of trouble will occur ?
> For example, Subscribed messages will be subscribe agein.
>
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>