You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by bansalp <bp...@gmail.com> on 2014/10/01 13:45:18 UTC
Notification of connection down between broker and client?
AMQGods Please help,
I have a system which is using failover uri mechanism with master-slave
architecture (when primary runs, failover waits on lock and when failover
run primary wait on lock on kahadb).
I need my clients to know when there is a problem with connection to broker.
Whenever primary goes down failover takes over and clients get connected to
failover broker. I want my clients to know that primary is down and
similarly when failover goes down my client should know about it.
What is the recommended way to do it?
Please help, I really need answer to this quickly.
Thanks
--
View this message in context: http://activemq.2283324.n4.nabble.com/Notification-of-connection-down-between-broker-and-client-tp4686035.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Notification of connection down between broker and client?
Posted by bansalp <bp...@gmail.com>.
Hi,
Thanks for reply.
Actually I want automated functionality, that is, whenever broker connection
is down my client get notified. Actually I have ActiveMQ as one of the
component in my system, So I just want my client to know that whether
problem was connection between activemq and client or some other component
in the system. I want to know about primary or secondary for logging purpose
only. My logic is not based on that.
What all functionality is there which can notify client only when something
happens to connection between broker and client?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Notification-of-connection-down-between-broker-and-client-tp4686035p4686063.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Notification of connection down between broker and client?
Posted by Andreas Gies <an...@wayofquality.de>.
Hello,
from an architecture perspective your clients shouldn't know. I think that
is the entire point of this kind of connection - it is transparent to the
client. You shouldn't base any logic in your application on to what broker
you are connected to.
You can monitor the ports of the broker instances, but that somehow feels
odd for a messaging client.
Perhaps you can elaborate on your use case ?
Best regards
Andreas
On 01/10/14 13:45, bansalp wrote:
> AMQGods Please help,
>
> I have a system which is using failover uri mechanism with master-slave
> architecture (when primary runs, failover waits on lock and when failover
> run primary wait on lock on kahadb).
>
> I need my clients to know when there is a problem with connection to broker.
>
> Whenever primary goes down failover takes over and clients get connected to
> failover broker. I want my clients to know that primary is down and
> similarly when failover goes down my client should know about it.
>
> What is the recommended way to do it?
>
> Please help, I really need answer to this quickly.
>
> Thanks
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Notification-of-connection-down-between-broker-and-client-tp4686035.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
Andreas Gies
WoQ -- Way of Quality GmbH
Geschäftsführer & CTO
/eMail:/andreas@wayofquality.de <ma...@wayofquality.de>
/Tel:/ +49 151 23470823
/Fax:/ +49 1805 006534 2114
/Twitter:/ andreasgies /Skype:/ giessonic
/LinkedIn:/ <http://de.linkedin.com/pub/andreas-gies/0/594/aa5/>
(http://de.linkedin.com/pub/andreas-gies/0/594/aa5/)
/Xing:/ <http://www.xing.com/profile/Andreas_Gies>
(http://www.xing.com/profile/Andreas_Gies)
/Blog:/ <http://www.wayofquality.de/index.php/en/blog>
(http://www.wayofquality.de/index.php/en/blog)
/Github:/ <https://github.com/atooni> (https://github.com/atooni)
/Amtsgericht Landshut:/HRB 8352//
//
/Ust.-Id.:/ DE274771254
Haftungsausschluss
Diese Email kann vertrauliche und/oder rechtlich geschützte
Informationen enthalten und ist ausschließlich für den/die benannten
Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Empfänger sein
oder diese Email irrtümlich erhalten haben, ist es Ihnen nicht gestattet
diese Mail oder einen Teil davon ohne unsere Erlaubnis zu verbreiten, zu
kopieren, unbefugt weiterzuleiten oder zu behalten. Informieren Sie
bitte sofort den Absender telefonisch oder per Email und löschen Sie
diese Email und alle Kopien aus Ihrem System. Wir haften nicht für die
Unversehrtheit von Emails, nachdem sie unseren Einflussbereich verlassen
haben.
Disclaimer
This email may contain confidential and/or privileged information and is
intended solely for the attention and use of the named addressee(s). If
you are not the intended recipient, or a person responsible for
delivering it to the intended recipient, you are not authorized to and
must not disclose, copy, distribute, or retain this message or any part
of it without our authority. Please contact the sender by call or reply
email immediately and destroy all copies and the original message. We
are not responsible for the integrity of emails after they have left our
sphere of control.
//
Re: Notification of connection down between broker and client?
Posted by bansalp <bp...@gmail.com>.
Is TransportListener is best way to do it? How to know of broker (primary or
failover if implementing TransportListener)
Thanks
--
View this message in context: http://activemq.2283324.n4.nabble.com/Notification-of-connection-down-between-broker-and-client-tp4686035p4686064.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Notification of connection down between broker and client?
Posted by Rob Davies <ra...@gmail.com>.
You could drop into ActiveMQ specific code - cast you Connection to an
ActiveMQConnection and add a TransportListener to get notifications of
the underlying transport events
see
http://activemq.apache.org/maven/apidocs/org/apache/activemq/ActiveMQConnection.html
and
http://activemq.apache.org/maven/apidocs/org/apache/activemq/transport/TransportListener.html
> bansalp <ma...@gmail.com>
> 1 October 2014 12:45
> AMQGods Please help,
>
> I have a system which is using failover uri mechanism with master-slave
> architecture (when primary runs, failover waits on lock and when failover
> run primary wait on lock on kahadb).
>
> I need my clients to know when there is a problem with connection to
> broker.
>
> Whenever primary goes down failover takes over and clients get
> connected to
> failover broker. I want my clients to know that primary is down and
> similarly when failover goes down my client should know about it.
>
> What is the recommended way to do it?
>
> Please help, I really need answer to this quickly.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Notification-of-connection-down-between-broker-and-client-tp4686035.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Notification of connection down between broker and client?
Posted by bansalp <bp...@gmail.com>.
Hi,
Thanks for reply.
Actually I want automated functionality, that is, whenever broker connection
is down my client get notified. Actually I have ActiveMQ as one of the
component in my system, So I just want my client to know that whether
problem was connection between activemq and client or some other component
in the system. I want to know about primary or secondary for logging purpose
only. My logic is not based on that.
What all functionality is there which can notify client only when something
happens to connection between broker and client?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Notification-of-connection-down-between-broker-and-client-tp4686035p4686065.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Notification of connection down between broker and client?
Posted by Marco Sacchetto <ma...@pradac.it>.
Any system monitoring tool would go with your case, even a remote one. The
trick is: ActiveMQ (at least the recent versions, which are what I use)
won't open the broker ports until it gets the lock on the database, so just
by looking at where your port is open you can tell which server is working
and which is not.
--
Questo messaggio è di carattere riservato ed è indirizzato esclusivamente
al destinatario specificato. L'accesso, la divulgazione, la copia o la
diffusione sono vietate a chiunque altro ai sensi delle normative vigenti,
e possono costituire una violazione penale. Nel caso abbiate ricevuto
questo messaggio per errore siete tenuti a cancellarlo immediatamente
confermando al mittente, a mezzo e-mail, l'avvenuta cancellazione. (Legge
Italiana 196/2003).
2014-10-01 13:45 GMT+02:00 bansalp <bp...@gmail.com>:
> AMQGods Please help,
>
> I have a system which is using failover uri mechanism with master-slave
> architecture (when primary runs, failover waits on lock and when failover
> run primary wait on lock on kahadb).
>
> I need my clients to know when there is a problem with connection to
> broker.
>
> Whenever primary goes down failover takes over and clients get connected to
> failover broker. I want my clients to know that primary is down and
> similarly when failover goes down my client should know about it.
>
> What is the recommended way to do it?
>
> Please help, I really need answer to this quickly.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Notification-of-connection-down-between-broker-and-client-tp4686035.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>