On Tue, 2009-03-24 at 00:46 -0700, dongabda wrote:
> Hi,
> I saw that the consumer doesn't give any exception, it apparently works
> without net link, but after restore the link the consumer doesn't receive
> nothing. How can I know if the connection is down? How can I reconnect it? I
> saw the CMS Api but I don't see any function to know if the session or
> connection are closed. 
> Thanks for your help
> Best regards
> dongabda
> 
> 
> Andreas Gies-3 wrote:
> > 
> > Hi there,
> > 
> > i assume that you have set the clientId and consumer name to the same  
> > value
> > after the reconnect ?
> > 
> > Best regards
> > Andreas
> > 
> > On Mar 23, 2009, at 5:15 PM, dongabda wrote:
> > 
> >>
> >> I have a messagebroker and a producer in Java (Both in same PC).
> >> The consumer is in other PC and C++(activemq-cpp.2.2.4)
> >> I use Topics with durableconsumer.
> >> When the messagebroker is stopped and I launch the consumer, it  
> >> gives a
> >> CMSException. This is perfect. but when all is running (messagebroker,
> >> producer and consumer) if the consumer or producer lost the link, any
> >> exception is launched, and after restore the link, the consumer never
> >> receives any message.
> >> Why? What can I do to continue receiving messages?

If you look at the CMS Connection interface you will find a method that
allows you to set an exception listener on the Connection object, this
listener will be called whenever an exception occurs in any of the
threads that run as part of the Connection, Sessions, etc.  You must
extend the CMS ExceptionListener interface to create a class that will
manage how your client deals with Connection failures, the examples in
the src/example folder all do this.

Regards
Tim.
-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/



Reply via email to