activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BenXS <bxsto...@yahoo.co.uk>
Subject Where is ProducerInfo+ConsumerInfo data structure for Advisory Msgs?
Date Fri, 20 Aug 2010 09:51:50 GMT

On page

http://activemq.apache.org/advisory-message.html

data structures named ProducerInfo + ConsumerInfo are mentioned.
Where do I find these data structures explained (resp. which fields they
contain in detail) ?

Furthermore I wonder how I can detect wether an incoming msg on an Advisorc
topic is a ProducerInfo OR ConsumerInfo type msg? On the web page above a
java sample is shown where an incoming msg is always casted on ProducerInfo:

ProducerInfo prod = (ProducerInfo) aMsg.getDataStructure();

Why ProducerInfo and not ConsumerInfo?

I expected some sort of investigation first:

if (aMsg instanceOf ProducerInfo) {
   ProducerInfo prod = (ProducerInfo) aMsg.getDataStructure(); }
else  {
   ConsumerInfo prod = (ConsumerInfo) aMsg.getDataStructure(); }
....

So how should this look like officially? Is there a more elaborated java
example?

Ben





-- 
View this message in context: http://old.nabble.com/Where-is-ProducerInfo%2BConsumerInfo-data-structure-for-Advisory-Msgs--tp29490375p29490375.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message