You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kitplummer <ki...@gmail.com> on 2006/05/09 00:57:25 UTC
is Broker up?
Is there a good strategy for checking to see if the Broker is up, from the
client side? I need to keep trying to connect until a connection is made...
Any insight?
TIA,
Kit
--
View this message in context: http://www.nabble.com/is-Broker-up--t1580466.html#a4290117
Sent from the ActiveMQ - User forum at Nabble.com.
Re: is Broker up?
Posted by kitplummer <ki...@gmail.com>.
Not sure what I did...but, I now have the auto-reconnect/failover feature
working. And it does work on the initial connection; the client sits
waiting for the broker to come online.
--
View this message in context: http://www.nabble.com/is-Broker-up--t1580466.html#a4309943
Sent from the ActiveMQ - User forum at Nabble.com.
Re: clouds of brokers ?
Posted by Paul Tomsic <pt...@yahoo.com>.
nevermind, it's the multicast servername
so "multicast://cloudone"
thanks
--- Paul Tomsic <pt...@yahoo.com> wrote:
> Is there a way to multicast brokers to only join a
> certain cloud of other brokers?
> For instance, basic multicasting, but in different
> environments, say
> cloud_dev { broker_A, broker_B, ... }
> cloud_staging { broker_foo, broker_bar, ... }
>
> setting the networkConnector's name doesn't seem to
> have this such effect.
>
> thoughts?
>
clouds of brokers ?
Posted by Paul Tomsic <pt...@yahoo.com>.
Is there a way to multicast brokers to only join a
certain cloud of other brokers?
For instance, basic multicasting, but in different
environments, say
cloud_dev { broker_A, broker_B, ... }
cloud_staging { broker_foo, broker_bar, ... }
setting the networkConnector's name doesn't seem to
have this such effect.
thoughts?
durable client after failure?
Posted by Paul Tomsic <pt...@yahoo.com>.
How do i set up a topic such that it has "knowledge"
of who has received what message?
The reason for this, is, say a consumer is grabbing
msgs from topic[a], and gets 1,2,3,4 then dies.
when that consumer reconnects, i don't want it to
re-retrieve 1-4, but rather start at 5 and proceed
from there.
?
Re: is Broker up?
Posted by kitplummer <ki...@gmail.com>.
James.Strachan wrote:
>
> On 5/9/06, kitplummer <ki...@gmail.com> wrote:
>> James.Strachan wrote:
>> >
>> > On 5/8/06, kitplummer <ki...@gmail.com> wrote:
>> >>
>> >> Is there a good strategy for checking to see if the Broker is up, from
>> >> the
>> >> client side? I need to keep trying to connect until a connection is
>> >> made...
>> >
>> > How about letting ActiveMQ do that for you?
>> >
>> > http://activemq.org/How+do+I+configure+automatic+reconnection
>> >
>> > you can also register a transport listener to listen for the
>> > connection state if you really want to do stuff manually yourself
>> >
>> >
>> http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/ActiveMQConnection.html#addTransportListener(org.apache.activemq.transport.TransportListener)
>> >
>>
>> I tried the automatic reconnection thing...but, it didn't seem to work if
>> the Broker wasn't available for the initial connection.
>
> In what way didn't it work? Did it 'hang' is that what you mean? We
> can't connect to a non-existing broker, so all we can do is to keep
> trying to connect. What else could you do?
>
I get an exception:
javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused
Which is what i'd expect. Here's the URL I passed:
String url = "failover:tcp://localhost:61616";
I have two apps. The first runs the broker. The second is a JMS client. I
need to provide the robustness to allow for the second to start first, and
keep trying to connect until the broker app comes up.
I probably could've explained this better from the get-go...sorry.
FWIW, If I start the broker first, the client second - then kill the broker
- the client crashes...and it doesn't look like it is trying to reconnect.
Here's the exception:
Caught: javax.jms.JMSException: The transport
tcp://localhost/127.0.0.1:61616 of type:
org.apache.activemq.transport.tcp.TcpTransport is not running.
[java] javax.jms.JMSException: The transport
tcp://localhost/127.0.0.1:61616 of type:
org.apache.activemq.transport.tcp.TcpTransport is not running.
Kit
--
View this message in context: http://www.nabble.com/is-Broker-up--t1580466.html#a4303776
Sent from the ActiveMQ - User forum at Nabble.com.
Re: is Broker up?
Posted by James Strachan <ja...@gmail.com>.
On 5/9/06, kitplummer <ki...@gmail.com> wrote:
> James.Strachan wrote:
> >
> > On 5/8/06, kitplummer <ki...@gmail.com> wrote:
> >>
> >> Is there a good strategy for checking to see if the Broker is up, from
> >> the
> >> client side? I need to keep trying to connect until a connection is
> >> made...
> >
> > How about letting ActiveMQ do that for you?
> >
> > http://activemq.org/How+do+I+configure+automatic+reconnection
> >
> > you can also register a transport listener to listen for the
> > connection state if you really want to do stuff manually yourself
> >
> > http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/ActiveMQConnection.html#addTransportListener(org.apache.activemq.transport.TransportListener)
> >
>
> I tried the automatic reconnection thing...but, it didn't seem to work if
> the Broker wasn't available for the initial connection.
In what way didn't it work? Did it 'hang' is that what you mean? We
can't connect to a non-existing broker, so all we can do is to keep
trying to connect. What else could you do?
--
James
-------
http://radio.weblogs.com/0112098/
Re: is Broker up?
Posted by kitplummer <ki...@gmail.com>.
James.Strachan wrote:
>
> On 5/8/06, kitplummer <ki...@gmail.com> wrote:
>>
>> Is there a good strategy for checking to see if the Broker is up, from
>> the
>> client side? I need to keep trying to connect until a connection is
>> made...
>
> How about letting ActiveMQ do that for you?
>
> http://activemq.org/How+do+I+configure+automatic+reconnection
>
> you can also register a transport listener to listen for the
> connection state if you really want to do stuff manually yourself
>
> http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/ActiveMQConnection.html#addTransportListener(org.apache.activemq.transport.TransportListener)
>
I tried the automatic reconnection thing...but, it didn't seem to work if
the Broker wasn't available for the initial connection.
--
View this message in context: http://www.nabble.com/is-Broker-up--t1580466.html#a4303116
Sent from the ActiveMQ - User forum at Nabble.com.
Re: is Broker up?
Posted by James Strachan <ja...@gmail.com>.
On 5/8/06, kitplummer <ki...@gmail.com> wrote:
>
> Is there a good strategy for checking to see if the Broker is up, from the
> client side? I need to keep trying to connect until a connection is made...
How about letting ActiveMQ do that for you?
http://activemq.org/How+do+I+configure+automatic+reconnection
you can also register a transport listener to listen for the
connection state if you really want to do stuff manually yourself
http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/ActiveMQConnection.html#addTransportListener(org.apache.activemq.transport.TransportListener)
--
James
-------
http://radio.weblogs.com/0112098/