activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nascent <>
Subject ActiveMQ-CPP and Advisory messages
Date Thu, 11 Jun 2009 15:26:23 GMT

I have a consumer written in C++ that uses ActiveMQ-CPP to communicate with
ActiveMQ. It implements a callback interface where a client can request
on-change updates for data points. The consumer then does a response message
to the original request from the client any time the data point updates. The
response messages go to a temporary queue (reply queue basically) that is
associated with the client.

I am trying to figure out a way for the consumer to know that the client has
gone away so it can stop sending updates and free up resources associated
with that client. I cannot always trust that the client will send some kind
of unsubscribe message. I am looking for a way that the consumer can know
authoritatively that the client has either disconnected from ActiveMQ or
that the temporary/reply queue for that client is no longer valid. It seems
like ActiveMQ's Advisory messages are the solution however I don't see how
they can be used through ActiveMQ-CPP since the messages use Java objects as
the body. 

Is there anyway to make use of the advisory messages through ActiveMQ-CPP? 

Is there perhaps a better way to handle the scenario listed above that has
less overhead? I have considered using a topic that all data point updates
would go to and then clients could consume with a selector to get only the
updates they care about. However, in my case, there are potentially hundreds
of data points updating every second and clients are usually only interested
in a handful of them. So it seems inefficient to me to have all these data
point updates going to a topic where less than 5% of them may actually be

Thanks in advance!
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message