On 8/16/06, B-Storm <[EMAIL PROTECTED]> wrote:

I am a newby at using ActiveMQ and therefore I have simple
questions.

Welcome! :)

 Maybe I missed a similar post in the forum?

In the situation where I have a publish - subscibe model... suppose
I have multiple subscribers consumming the messages. The
subscriptions are not durable and the messages are not persistent.
Then one of my subscribers crashes without properly closing the
session/connection etc. When a subscriber crashes unexpectedly I don't want
ActiveMQ to try to send anymore message to them. I assume it will
generate an exception of some sort within the broker.

Yes.


1. What is the behavior of ActiveMQ going to be in this situation?

The broker will kill the connection and not dispatch (or keep around)
any more messages for that consumer


2. For all of the message received from the publisher(s) how often
    will it attempt to send new messages to the crashed subscriber
    before giving up on it?

Once it decides the connection is dead it stops doing anything for
that client any more.  Typically it stops a connection when the socket
dies. There's also an inactivity timeout applied above the TCP layer
in case your OS doesn't inform Java of sockets terminating fast
enough. You can tweak the socket timeouts etc via the TCP transport...
http://activemq.org/site/tcp-transport-reference.html

or specify an inactivity timeout via the wireformat...
http://activemq.org/site/configuring-wire-formats.html

BTW the parent page of those links is a handy place to start on as its
got lots of information on how you can configure ActiveMQ using a
simple URI syntax...
http://activemq.org/site/configuring-transports.html


3. Will this affect the future performance of ActiveMQ's message
    delivery to the other subscribers?

No. As soon as the connection is closed by the broker its resources
are all discarded. The only real way a subscriber can adversely affect
the broker is by working perfectly but by going very slow compared to
the other subscribers...

http://activemq.org/site/slow-consumer-handling.html



4. Is there a way to configure ActiveMQ to stop sending messages
    to crashed clients and close the connection after a certain number
    of failed attempts (non-durable, non-persistent)?

As soon as connection is closed, the broker disconnects the client.
The client can auto-reconnect if it uses the failover transport...

http://activemq.org/site/failover-transport-reference.html

5. Is there a way to be notified of subscribers that are not accepting
    messages?

You can use JMX to watch the system
http://activemq.org/site/jmx.html

or you can use advisories
http://activemq.org/site/advisory-message.html
--

James
-------
http://radio.weblogs.com/0112098/

Reply via email to