activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] Commented: (AMQNET-172) Extend IConnection with connection information
Date Wed, 07 Oct 2009 18:51:53 GMT


Timothy Bish commented on AMQNET-172:

I added the ability for the Transports in NMS.ActiveMQ to propagate TransportInterrupted and
TransportResumed events awhile back.  This allows the ActiveMQ Connection class to be notified
by the FailoverTransport when a transport fails and when a new connection has been established.

What we need to decide is whether to add events just to NMS.ActiveMQ's Connection class for
passing this along to clients or whether we want this to be part of the NMS API.  I don't
know if any of the other providers support anything quite like this so it could be something
that's unique to the AMQ client.  

We could add delegates for this to AMQ's Connection as follows:

	public delegate void ConnectionInterruptedListener();
	public delegate void ConnectionResumedListener();

and then expose events for each:

	public event ConnectionInterruptedListener InterruptedListener;
	public event ConnectionResumedListener ResumedListener;

The Connection class already listens for the Transport notifications in its OnTransportInterrupted
and OnTransportResumed methods so we just need to pass this along to listeners from there.

> Extend IConnection with connection information
> ----------------------------------------------
>                 Key: AMQNET-172
>                 URL:
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: ActiveMQ
>         Environment: Any
>            Reporter: Michel Van Hoof
>            Assignee: Jim Gomes
>             Fix For: 1.2.0
> I think it would be "nice" to have some properties on the IConnection interface to get
a status from the connection since while in most cases, you can get this through an exception,
there is no realy way to know when your consumer is connected/disconnected from the broker
when using the failover protocol
> I have tryed to access the FailOverTransport.IsConnected property but apparently, there
is no way to to this when using the IConnectionFactory
> I don't know if it is possible to trigger an event on connect/disconnect from the broker
and create an "isconnected" property ?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message