activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Stette" <jan.ste...@gmail.com>
Subject Re: ActiveMQ peer mode and durable subscriptions
Date Mon, 30 Jul 2007 17:16:49 GMT
To add some more details to that:

>From experiment, "durable" subscriptions aren't working across two peers in
my current setup (two processes, embedded brokers in each, connecting using
the "peer" mode).  That is, messages are received OK normally, but messages
sent while one of the peers is down are not retransmitted.

Looking in the JMX info, the subscriptions are registered as durable and
seen across peers.  However, the peer connection seems to generate a
different clientId on restart, so I guess the peer doesn't recognise the
restarted peer and thinks it's a new one.

I'm setting the clientId to a persistent value on my connections, but I
guess that affects the connection to the embedded broker only and not the
connection between the two peers.
Is there a way I can set the clientId on the peer connections, so that
restarted peers are recognised as such?  Or is there something else I need
to do to get this setup working?

(I am using ActiveMQ 4.1.1, JDK 6, on Linux).

Many thanks,
Jan


On 27/07/07, Jan Stette <jan.stette@gmail.com> wrote:
>
> I'm currently using ActiveMQ in peer mode with brokers embedded in a
> number of distributed nodes.  I'd like to make messages published on some
> topics durable, so that they are reliably delivered to subscribers.  I am
> happy with messaging potentially being lost in the case of a restart of the
> publishing process in this scenario, so I don't want to make the publishers
> persistent.
>
> My question is then:
> If I make subscribers to these topics durable (and set a suitable message
> expiry time), will messages be delivered in the following scenario?
>
> - I have processes P1 and P2 with embedded brokers, these are connected
> using the peer transport.
> - I have a publisher Pub1 in process P1, and a durable subscriber Sub1 in
> process P2, and these are communicating successfully.
> - The connection goes down between P1 and P2, say due to a network fault.
> - Pub1 publishes a message M.
> - The connection is restored between brokers in P1 and P2.
>
> At this point, will the message M be redelivered to Sub1?
>
> I guess my question then is: is the transport between peer brokers
> "durable" in the sense that durable subscriptions will be treated as such?
>
> Many thanks,
> Jan
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message