You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jo (JIRA)" <ji...@apache.org> on 2018/01/24 15:13:00 UTC

[jira] [Created] (AMQ-6890) ConsumerInfo clientId = null

Jo created AMQ-6890:
-----------------------

             Summary: ConsumerInfo clientId = null
                 Key: AMQ-6890
                 URL: https://issues.apache.org/jira/browse/AMQ-6890
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.15.2
            Reporter: Jo


Hi,

We have a jms listener that monitor the consumer advisory topic.
It appears that on message we get the activeMQMessage datastructure the consumerInfo.getClientId() returns "null".

Is there a fix to always get the clientId filled when getting a new consumerInfo?

 

Subscription : ConsumerInfo {commandId = 3, responseRequired = true, consumerId = ID:AFR671821-60665-1516788633607-3:4:-1:1,
destination = topic://ieb.test, prefetchSize = 100, maximumPendingMessageLimit = 0, 
browser = false, dispatchAsync = true, selector = null, *clientId = null*, subscriptionName = EXACTLY_ONCE:ieb/test, 
noLocal = false, exclusive = false, retroactive = true, priority = 0, brokerPath = null, optimizedAcknowledge = false, 
noRangeAcks = false, additionalPredicate = null}
{code:java}
DataStructure ds = activemqMessage.getDataStructure();
if (ds != null) {
switch (ds.getDataStructureType()) {
case CommandTypes.CONSUMER_INFO:
ConsumerInfo consumerInfo = (ConsumerInfo) ds;
LOG.debug("Subscription : {}", consumerInfo);
break;
case CommandTypes.REMOVE_INFO:
RemoveInfo removeInfo = (RemoveInfo) ds;
LOG.debug("Temporary unsubscribe : {}", removeInfo);
break;
case CommandTypes.REMOVE_SUBSCRIPTION_INFO:
RemoveSubscriptionInfo removeSubscriptionInfo = (RemoveSubscriptionInfo) ds;
LOG.debug("Permanent unsubscribe : {}", removeSubscriptionInfo);
break;
default:
throw new IebManagerException("Unkown data structure type : " + ds.getDataStructureType());
}
} else {
throw new IebManagerException("No data structure provided");
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)