You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Scott@Egistix" <sh...@egistix.com> on 2008/02/15 20:07:37 UTC

C# NMS questions.

I have a few implementation questions I was hoping someone would be kind
enough to answer.

I have a C# 2.0 windows forms application, using NMS checked out from the
trunk, server is activemq 5.0.

The forms application is an MDI.  I have the main frame holding the
connection/session,
and each form/window is a MessageConsumer listening to a different topic
(non-durable).
Ideally, I would like to alert the user when the broker/connection goes
down, and when it comes back up.
As well, of course I want the application to recover be listening again when
the broker is back up.

My questions are:
1) Does this seem reasonable?
2) Is there any easy way of showing the current connection status?
3) Will have to handle the reconnect manually when the broker goes down?
4) If the broker goes down, do I have to recreate an the connection again
(and session, and consumers),
or is there an easier way?

Thanks,
Scott

Thanks,
-- 
View this message in context: http://www.nabble.com/C--NMS-questions.-tp15508046s2354p15508046.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: C# NMS questions.

Posted by semog <e....@gmail.com>.
Hi Scott,

The connect/reconnect scenario is implementation specific, which means it'll
be manual.  I've done something similar to what you are trying to do, but
the re-connect is quiet since my application doesn't have any user
interface.  Some applications may not want to re-connect, others may want to
send e-mail notifications.  It varies.

Let me know if you want any specific suggestions.

- Jim


Scott@Egistix wrote:
> 
>> Have you tried to test this scenario? I believe you should get some 
>> exception when connection is broken.
> 
> Yes, it does...but recovery is manual...
> ie.
> 
> Upon failure, I have to start a timer, and try and reconnect, upon
> success, I then have to recreate my session and all my consumers, seems
> cumbersome, I guess I was naively hoping for a better way.
> 
> 

-- 
View this message in context: http://www.nabble.com/C--NMS-questions.-tp15508046s2354p15602222.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: C# NMS questions.

Posted by "Scott@Egistix" <sh...@egistix.com>.
> Have you tried to test this scenario? I believe you should get some 
> exception when connection is broken.

Yes, it does...but recovery is manual...
ie.

Upon failure, I have to start a timer, and try and reconnect, upon success,
I then have to recreate my session and all my consumers, seems cumbersome, I
guess I was naively hoping for a better way.

-- 
View this message in context: http://www.nabble.com/C--NMS-questions.-tp15508046s2354p15594276.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: C# NMS questions.

Posted by Oleg Deribas <th...@td.selfip.net>.
Scott@Egistix wrote:

> Ideally, I would like to alert the user when the broker/connection goes
> down, and when it comes back up.

Have you tried to test this scenario? I believe you should get some 
exception when connection is broken.

-- 
Oleg