You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "aries.aries" <ar...@gmail.com> on 2016/08/15 17:54:35 UTC

Replicating a file on backup server

Hi,

I am working on a project using Artemis. I have a scenario where I need to
replicate a file (around 10KB size) on the backup servers when the cluster
are setup and running in the "replication" HA policy mode.

I read about the journals used by artemis but I am not sure how to use them
for my scenario. Can someone please guide me as to how this can be done?
Much appreciated.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Replicating-a-file-on-backup-server-tp4715489.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Replicating a file on backup server

Posted by Justin Bertram <jb...@apache.com>.
I recommend you consult the documentation and/or the examples for information about sending a durable message to a queue and then consuming it later.  This is pretty much the most basic thing you can do with a message broker.


Justin

----- Original Message -----
From: "aries.aries" <ar...@gmail.com>
To: dev@activemq.apache.org
Sent: Friday, August 19, 2016 9:10:30 AM
Subject: Re: Replicating a file on backup server

Hi,

I think I could do that. Could you please tell me how do I send something to
a queue as a durable message? And how do I read from it from the queue later
on? Much appreciated.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Replicating-a-file-on-backup-server-tp4715489p4715662.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Replicating a file on backup server

Posted by "aries.aries" <ar...@gmail.com>.
Hi,

I think I could do that. Could you please tell me how do I send something to
a queue as a durable message? And how do I read from it from the queue later
on? Much appreciated.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Replicating-a-file-on-backup-server-tp4715489p4715662.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Replicating a file on backup server

Posted by Justin Bertram <jb...@apache.com>.
The broker will replicate message data from the master to the slave so that any message in a queue on the master will still be in the queue if the master fails and the slave takes over.  However, if you consume the message then it's no longer in a queue and therefore will be removed from both the master and the slave.

The broker does not expose any kind of general purpose file replication functionality and you can't modify the journal yourself.  If instead of writing your computations to a file you sent the results to a queue as durable messages then that data would be replicated from the master to the slave.


Justin

----- Original Message -----
From: "aries.aries" <ar...@gmail.com>
To: dev@activemq.apache.org
Sent: Thursday, August 18, 2016 6:00:10 PM
Subject: Re: Replicating a file on backup server

Hi,

Basically I am intercepting the mqtt messages and doing some computations. I
store these to a file. I wanted this file to be available on the slave as
well when it takes over the master. I need to use the values from the file
to resume the computation.

From what I read from artemis documentation, it does not use any distributed
store. I know that it can be done using shared storage but I wanted to know
if it can be done using the "replication" HA policy.

Can you please suggest me something that can be done for this? or can I
append the data to the journal file and then read from it when it is
replicated on the slave?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Replicating-a-file-on-backup-server-tp4715489p4715642.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Replicating a file on backup server

Posted by "aries.aries" <ar...@gmail.com>.
Hi,

Basically I am intercepting the mqtt messages and doing some computations. I
store these to a file. I wanted this file to be available on the slave as
well when it takes over the master. I need to use the values from the file
to resume the computation.

From what I read from artemis documentation, it does not use any distributed
store. I know that it can be done using shared storage but I wanted to know
if it can be done using the "replication" HA policy.

Can you please suggest me something that can be done for this? or can I
append the data to the journal file and then read from it when it is
replicated on the slave?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Replicating-a-file-on-backup-server-tp4715489p4715642.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Replicating a file on backup server

Posted by Clebert Suconic <cl...@gmail.com>.
I'm not understanding what you need to do.


The replication on Artemis is used to backup messages between a live
and a backup server. Not to replicate your files. When you send a
message you will be sure that the message is safe in one of the
servers.



You send messages to the live server. In case the live crashes the
clients will failover to the backup and the clients will then receive
from that node. which is our HA model.

I suggest you look at the docs. and maybe research about message
systems a little bit?


Let me know if you get some more udnerstanding..






On Mon, Aug 15, 2016 at 1:54 PM, aries.aries
<ar...@gmail.com> wrote:
> Hi,
>
> I am working on a project using Artemis. I have a scenario where I need to
> replicate a file (around 10KB size) on the backup servers when the cluster
> are setup and running in the "replication" HA policy mode.
>
> I read about the journals used by artemis but I am not sure how to use them
> for my scenario. Can someone please guide me as to how this can be done?
> Much appreciated.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Replicating-a-file-on-backup-server-tp4715489.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.



-- 
Clebert Suconic