You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "srikanth.april30" <sr...@gmail.com> on 2016/05/06 05:44:02 UTC

can we share the data folder of activemq between two machines (local and remote)

Hi ActiveMq Team,
I am working on a POC related to ActiveMq. Does the Master/Slave concept is
achievable with two ActiveMQ instances (one in local machine and other in
remote machine) ?

Please help me with some information .

Thanks
Srikanth



--
View this message in context: http://activemq.2283324.n4.nabble.com/can-we-share-the-data-folder-of-activemq-between-two-machines-local-and-remote-tp4711666.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: can we share the data folder of activemq between two machines (local and remote)

Posted by Matt Pavlovich <ma...@gmail.com>.
NFSv4 or GFSv2 are your best bets for file systems with proper lock 
sharing semantics (other commercial FS that have proper cluster-aware 
lock sharing should work too, but aren't widely tested/supported-- like 
Veritas, etc)

On 5/7/16 4:06 PM, Tim Bain wrote:
> I've never seen anyone use Samba to share a KahaDB directory; are you sure
> that Samba provides file-locking semantics that are compatible with
> master/slave KahaDB?  NFSv4 is what I've typically seen done, and unless
> you've found an article or a wiki page that says that Samba is supposed to
> work for your use case, I'd expect that's why it's not working as you want
> it to.
>
> Tim
> On May 7, 2016 9:24 AM, "srikanth.april30" <sr...@gmail.com>
> wrote:
>
>> Hi Tim,
>> Thanks for your reply.
>> I have used the shared filesystem concept (refering
>> http://activemq.apache.org/shared-file-system-master-slave.html) and tried
>> to design the master slave cluster in two different machines. Below is the
>> enivronment details:
>>
>> apache-activemq-5.13.3
>> Two Systems(local-master broker and remote-slave broker ) with Ubuntu
>> Operating system
>> Created a Shared folder in local system and given all read and write access
>> to the kahadb folder.
>>
>> In local system activemq's directory I have configured the activemq.xml
>> file
>> with the below configuration:
>>
>> <persistenceAdapter>
>>          <kahaDB directory="/home/Downloads/sharedFolder/kahadb"/>
>>   </persistenceAdapter>
>> <networkConnectors>
>>          <networkConnector uri="static:(tcp://ip address of remote
>> system:61617)"/>
>> </networkConnectors>
>>
>> In Remote system activemq's directory I have configured the activemq.xml
>> with the below configuration:
>>
>> <persistenceAdapter>
>>          <kahaDB directory="smb://ip address of local
>> system/pathto/sharedFolder/kahadb"/>
>>   </persistenceAdapter>
>> <networkConnectors>
>>          <networkConnector uri="static:(tcp://ip address of local
>> system:61616)"/>
>> </networkConnectors>
>>
>> And When I start the client program and place the messages (say some 30
>> messages) into the queues I have observed that the shared directory is not
>> working properly. I stopped the master broker after 6 messages are placed
>> then remote slave broker has taken the placing messages task but only 24
>> messages are shown in the queue UI. The first 6 messages are not shared
>> with
>> the slave broker.
>>
>> Is there are configuration part I missed ? Can you please help me in the
>> configuration part?
>>
>> Thanks
>> Srikanth
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/can-we-share-the-data-folder-of-activemq-between-two-machines-local-and-remote-tp4711666p4711728.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>


Re: can we share the data folder of activemq between two machines (local and remote)

Posted by Tim Bain <tb...@alumni.duke.edu>.
There's nothing official that I'm aware of, but here are a few places where
different users have shared settings they've used:

   - https://issues.apache.org/jira/browse/AMQ-5549
   -
   http://activemq.2283324.n4.nabble.com/NFS-locking-issue-for-Master-Slave-tp2359793p2359795.html
   -
   http://activemq.2283324.n4.nabble.com/question-for-users-of-NFS-master-slave-setups-td4708204.html
   -
   http://activemq.2283324.n4.nabble.com/NFS-v4-locks-given-up-w-o-any-logging-tp4709672p4709689.html

Tim

On Sat, May 7, 2016 at 7:49 PM, srikanth.april30 <srikanth.april30@gmail.com
> wrote:

> Hi Tim,
> Thanks for your reply,
> Can you please share any article or wiki page or example link on how to use
> NFSv4 to achieve my use case defined above.
>
> Thanks
> Srikanth.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/can-we-share-the-data-folder-of-activemq-between-two-machines-local-and-remote-tp4711666p4711730.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: can we share the data folder of activemq between two machines (local and remote)

Posted by "srikanth.april30" <sr...@gmail.com>.
Hi Tim,
Thanks for your reply,
Can you please share any article or wiki page or example link on how to use
NFSv4 to achieve my use case defined above.

Thanks
Srikanth.



--
View this message in context: http://activemq.2283324.n4.nabble.com/can-we-share-the-data-folder-of-activemq-between-two-machines-local-and-remote-tp4711666p4711730.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: can we share the data folder of activemq between two machines (local and remote)

Posted by Tim Bain <tb...@alumni.duke.edu>.
I've never seen anyone use Samba to share a KahaDB directory; are you sure
that Samba provides file-locking semantics that are compatible with
master/slave KahaDB?  NFSv4 is what I've typically seen done, and unless
you've found an article or a wiki page that says that Samba is supposed to
work for your use case, I'd expect that's why it's not working as you want
it to.

Tim
On May 7, 2016 9:24 AM, "srikanth.april30" <sr...@gmail.com>
wrote:

> Hi Tim,
> Thanks for your reply.
> I have used the shared filesystem concept (refering
> http://activemq.apache.org/shared-file-system-master-slave.html) and tried
> to design the master slave cluster in two different machines. Below is the
> enivronment details:
>
> apache-activemq-5.13.3
> Two Systems(local-master broker and remote-slave broker ) with Ubuntu
> Operating system
> Created a Shared folder in local system and given all read and write access
> to the kahadb folder.
>
> In local system activemq's directory I have configured the activemq.xml
> file
> with the below configuration:
>
> <persistenceAdapter>
>         <kahaDB directory="/home/Downloads/sharedFolder/kahadb"/>
>  </persistenceAdapter>
> <networkConnectors>
>         <networkConnector uri="static:(tcp://ip address of remote
> system:61617)"/>
> </networkConnectors>
>
> In Remote system activemq's directory I have configured the activemq.xml
> with the below configuration:
>
> <persistenceAdapter>
>         <kahaDB directory="smb://ip address of local
> system/pathto/sharedFolder/kahadb"/>
>  </persistenceAdapter>
> <networkConnectors>
>         <networkConnector uri="static:(tcp://ip address of local
> system:61616)"/>
> </networkConnectors>
>
> And When I start the client program and place the messages (say some 30
> messages) into the queues I have observed that the shared directory is not
> working properly. I stopped the master broker after 6 messages are placed
> then remote slave broker has taken the placing messages task but only 24
> messages are shown in the queue UI. The first 6 messages are not shared
> with
> the slave broker.
>
> Is there are configuration part I missed ? Can you please help me in the
> configuration part?
>
> Thanks
> Srikanth
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/can-we-share-the-data-folder-of-activemq-between-two-machines-local-and-remote-tp4711666p4711728.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: can we share the data folder of activemq between two machines (local and remote)

Posted by "srikanth.april30" <sr...@gmail.com>.
Hi Tim,
Thanks for your reply. 
I have used the shared filesystem concept (refering
http://activemq.apache.org/shared-file-system-master-slave.html) and tried
to design the master slave cluster in two different machines. Below is the
enivronment details:

apache-activemq-5.13.3
Two Systems(local-master broker and remote-slave broker ) with Ubuntu
Operating system
Created a Shared folder in local system and given all read and write access
to the kahadb folder.

In local system activemq's directory I have configured the activemq.xml file
with the below configuration:

<persistenceAdapter>
        <kahaDB directory="/home/Downloads/sharedFolder/kahadb"/>
 </persistenceAdapter>
<networkConnectors>
  	<networkConnector uri="static:(tcp://ip address of remote
system:61617)"/>
</networkConnectors>

In Remote system activemq's directory I have configured the activemq.xml
with the below configuration:

<persistenceAdapter>
        <kahaDB directory="smb://ip address of local
system/pathto/sharedFolder/kahadb"/>
 </persistenceAdapter>
<networkConnectors>
  	<networkConnector uri="static:(tcp://ip address of local system:61616)"/>
</networkConnectors>

And When I start the client program and place the messages (say some 30
messages) into the queues I have observed that the shared directory is not
working properly. I stopped the master broker after 6 messages are placed
then remote slave broker has taken the placing messages task but only 24
messages are shown in the queue UI. The first 6 messages are not shared with
the slave broker.

Is there are configuration part I missed ? Can you please help me in the
configuration part?

Thanks
Srikanth



--
View this message in context: http://activemq.2283324.n4.nabble.com/can-we-share-the-data-folder-of-activemq-between-two-machines-local-and-remote-tp4711666p4711728.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: can we share the data folder of activemq between two machines (local and remote)

Posted by Tim Bain <tb...@alumni.duke.edu>.
Yes, a shared filesystem is the standard way to do master/slave with
KahaDB, and it can be done with brokers on different hosts as long as all
brokers have read/write access to the data directory.  Just be sure you
understand that in a master/slave cluster, one and only one of the brokers
(the master) is active at a time, and the others (the slaves) are sitting
idle waiting for the master to fail so they can become the master.  So the
brokers aren't sharing the data directory in the sense of both using it at
once, just in the sense that one can take over exclusive use of it if the
other fails.

Tim

On May 6, 2016 10:19 AM, "srikanth.april30" <sr...@gmail.com>
wrote:

> Hi ActiveMq Team,
> I am working on a POC related to ActiveMq. Does the Master/Slave concept is
> achievable with two ActiveMQ instances (one in local machine and other in
> remote machine) ?
>
> Please help me with some information .
>
> Thanks
> Srikanth
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/can-we-share-the-data-folder-of-activemq-between-two-machines-local-and-remote-tp4711666.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>