You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sophia Wright <so...@gmail.com> on 2013/12/17 07:33:07 UTC

Why does connection id use broker host in case of STOMP clients?

Hi ActiveMQ team,

I noticed that ActiveMQ connectionId is constructed based on client host in
case of JMS client but uses broker host in case of STOMP clients. Could you
please let me know why is this difference in implementation?

What is the client id and connection id used for? How different is this from
durable subscriber id? We are working on a setup where a broker will change
location from one host to another on restart. When this happens, the
connection id and client id in case of STOMP clients which is constructed
based on broker host may also change? I am nervous if this will not work for
durable subscribers.

Do you see any other issues/dependencies of running broker on the cloud and
have the load balancer forward client requests to the required host?

If we really need to use the broker host, why not use the broker name which
is specified in the broker cfg file instead of the physical host name?

Please please help!

Thanks a ton!

-Sophia



--
View this message in context: http://activemq.2283324.n4.nabble.com/Why-does-connection-id-use-broker-host-in-case-of-STOMP-clients-tp4675610.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Why does connection id use broker host in case of STOMP clients?

Posted by Paul Gale <pa...@gmail.com>.
Hi Sophia,

It's not clear to me how you intend to use the load balancer. Are you
expecting it to route traffic to the appropriate broker based on
client_id by inspecting messages or something else? Are multiple
brokers expected to be active simultaneously or master/slave?

Do you have to use a load-balancer? Are you aware that you can do
client-side load-balancing, even with STOMP? I've heard anecdotally of
some users employing a load-balancer to good effect. However, I have
no personal experience of configuring a load-balancer for use with
ActiveMQ.

Regarding durable subscriptions; in STOMP it is the combination of the
client_id AND the durableSubscriptionName attributes that uniquely
identify an individual subscription. It's possible for a consumer to
create multiple durable subscriptions. The consumer can be subscribed
to one, some or all of them concurrently.

AFAIK the connection id is mapped to the 'session' attribute on the
CONNECTED response frame. However, as far as the STOMP client is
concerned it is opaque and contains no information that should be
parsed.

Not sure if that helps.

Thanks,
Paul


On Thu, Dec 19, 2013 at 12:14 AM, Sophia Wright
<so...@gmail.com> wrote:
> Hi ActiveMQ Gods,
>
> Could you please share your insights on this?
>
> Thanks.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Why-does-connection-id-use-broker-host-in-case-of-STOMP-clients-tp4675610p4675684.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Why does connection id use broker host in case of STOMP clients?

Posted by Sophia Wright <so...@gmail.com>.
Hi ActiveMQ Gods,

Could you please share your insights on this?

Thanks.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Why-does-connection-id-use-broker-host-in-case-of-STOMP-clients-tp4675610p4675684.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Why does connection id use broker host in case of STOMP clients?

Posted by Sophia Wright <so...@gmail.com>.
Could somebody from the ActiveMQ team please respond to these queries:

What is the client id and connection id used for? How different is this from
durable subscriber id? We are working on a setup where a broker will run on
the cloud and change location from one host to another on restart. When this
happens, the connection id and client id in case of STOMP clients which is
constructed based on broker host may also change? I will specify explicit
client id and durable subscriber name for durable subscriber so that this
does not change on broker restart.

However, other ids may still change. Do you see any issues/dependencies of
running broker on the cloud and have the load balancer forward client
requests to the required host? 

If we really need to use the broker host, why not use the broker name which
is specified in the broker cfg file instead of the physical host name? 

-Sophia



--
View this message in context: http://activemq.2283324.n4.nabble.com/Why-does-connection-id-use-broker-host-in-case-of-STOMP-clients-tp4675610p4675654.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.