You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by giox79 <gi...@gmail.com> on 2017/06/20 15:22:57 UTC

Persistent queue storage area

I'm a fresh user of ActiveMQ technology, and I have some problem approaching
this technology.

I have the following situation:

* I have a SW, running in a embedded (offline) ARM device (A), that archive
a set of messages in a local hard disk.
* Once a month we have to extract the hard disk and to connect it to another
embedded online ARM device (B), that should notify a ActiveMQ server about
the alarms generated by (A)

And now my question: how can I store the persistent queue on the hard disk
when (A) is offline, so that the events generated by (A) will be available
to (B) when the HD is connected to (B)? 

Please note that the only "connection" between online and offline embedded
device is hard disk.



Giovanni




--
View this message in context: http://activemq.2283324.n4.nabble.com/Persistent-queue-storage-area-tp4727578.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Persistent queue storage area

Posted by Tim Bain <tb...@alumni.duke.edu>.
You don't program KahaDB. You run an ActiveMQ broker that knows how to
write to and read from KahaDB, and then you publish messages to a queue on
that broker via the ActiveMQ CMS library, and the broker will write them to
KahaDB.

Tim

On Jun 21, 2017 2:07 AM, "giox79" <gi...@gmail.com> wrote:

> Hi Tim.
> Thank you for your useful help.
> I think that the suggested approach is the right one.
> I was searching for something similar but I wasn't able to find it.
>
> However I don't understand how to configure programmatically the KahaDB
> (I'm
> programming in C++).
>
> The example in:
> http://activemq.apache.org/cms/example.html
> <http://activemq.apache.org/cms/example.html>
>
> doesn't specify how to perform the operation.
> Do you have any useful link about this topic?
> Best regards
> Giovanni
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Persistent-queue-storage-area-tp4727578p4727619.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Persistent queue storage area

Posted by giox79 <gi...@gmail.com>.
Hi Tim.
Thank you for your useful help.
I think that the suggested approach is the right one.
I was searching for something similar but I wasn't able to find it.

However I don't understand how to configure programmatically the KahaDB (I'm
programming in C++).

The example in:
http://activemq.apache.org/cms/example.html
<http://activemq.apache.org/cms/example.html>  

doesn't specify how to perform the operation.
Do you have any useful link about this topic?
Best regards
Giovanni




--
View this message in context: http://activemq.2283324.n4.nabble.com/Persistent-queue-storage-area-tp4727578p4727619.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Persistent queue storage area

Posted by Tim Bain <tb...@alumni.duke.edu>.
If your goal is to publish messages on host A while the drive is mounted to
A, and then have them become available to host B when the drive is mounted
to B, you should be able to configure an ActiveMQ broker with a KahaDB
storage location on the disk. A would run a copy of the broker (only when
the disk is mounted), and any messages published (to a queue with no
consumers, presumably) would be written to disk. Then the broker would be
shut down, the disk would be moved to B, and a similarly-configured broker
process would be started on B, which would allow a process on B to consume
messages from the queue.

The simplest configuration would be to have just one broker on each host,
and then have each client (producer on A, consumer on B) process be robust
enough to survive the periods of time when no broker was available because
the drive is mounted to the other host. If that's not acceptable, you could
run two brokers on each host in a network of brokers configuration, where
the clients connect to a broker that's always up and then the broker that
writes to the drive is started and stopped as needed; that way, the clients
can always talk to a broker and the unavailability of the drive is a
transient and transparent occurrence that they don't have to know about or
care about.

Tim

On Tue, Jun 20, 2017 at 9:59 AM, Justin Bertram <jb...@redhat.com> wrote:

> I'm not aware of any out-of-the-box solution for any ActiveMQ broker to
> automate your use-case.  It's up to your software to write the data to disk
> when offline (in whatever format suits your needs) and then to read it from
> disk and send it to the ActiveMQ broker when online.
>
>
> Justin
>
> On Tue, Jun 20, 2017 at 10:22 AM, giox79 <gi...@gmail.com>
> wrote:
>
> > I'm a fresh user of ActiveMQ technology, and I have some problem
> > approaching
> > this technology.
> >
> > I have the following situation:
> >
> > * I have a SW, running in a embedded (offline) ARM device (A), that
> archive
> > a set of messages in a local hard disk.
> > * Once a month we have to extract the hard disk and to connect it to
> > another
> > embedded online ARM device (B), that should notify a ActiveMQ server
> about
> > the alarms generated by (A)
> >
> > And now my question: how can I store the persistent queue on the hard
> disk
> > when (A) is offline, so that the events generated by (A) will be
> available
> > to (B) when the HD is connected to (B)?
> >
> > Please note that the only "connection" between online and offline
> embedded
> > device is hard disk.
> >
> >
> >
> > Giovanni
> >
> >
> >
> >
> > --
> > View this message in context: http://activemq.2283324.n4.
> > nabble.com/Persistent-queue-storage-area-tp4727578.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>

Re: Persistent queue storage area

Posted by Justin Bertram <jb...@redhat.com>.
I'm not aware of any out-of-the-box solution for any ActiveMQ broker to
automate your use-case.  It's up to your software to write the data to disk
when offline (in whatever format suits your needs) and then to read it from
disk and send it to the ActiveMQ broker when online.


Justin

On Tue, Jun 20, 2017 at 10:22 AM, giox79 <gi...@gmail.com> wrote:

> I'm a fresh user of ActiveMQ technology, and I have some problem
> approaching
> this technology.
>
> I have the following situation:
>
> * I have a SW, running in a embedded (offline) ARM device (A), that archive
> a set of messages in a local hard disk.
> * Once a month we have to extract the hard disk and to connect it to
> another
> embedded online ARM device (B), that should notify a ActiveMQ server about
> the alarms generated by (A)
>
> And now my question: how can I store the persistent queue on the hard disk
> when (A) is offline, so that the events generated by (A) will be available
> to (B) when the HD is connected to (B)?
>
> Please note that the only "connection" between online and offline embedded
> device is hard disk.
>
>
>
> Giovanni
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Persistent-queue-storage-area-tp4727578.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>