Need help with subscribing to MessageConsumed advisory...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Need help with subscribing to MessageConsumed advisory...

redboy1972
I need to be able to receive notification when a ActiveMQ client consumes a MQTT message.  I tried to first post on stackoverflow but haven't got a reponse yet.
See: http://stackoverflow.com/questions/31079067/issues-getting-activemq-advisory-messages-for-messageconsumed

activemq.xml

<destinationPolicy>
    <policyMap>
      <policyEntries>
            <policyEntry topic=">" advisoryForConsumed="true" />
      </policyEntries>
    </policyMap>
</destinationPolicy>
In the below code, I get MQTT messages on myTopic fine. I do not get advisory messages in processAdvisoryMessage / processAdvisoryBytesMessage.

@Component
public class MqttMessageListener {
    @JmsListener(destination = "mytopic")
    public void processMessage(BytesMessage message) {
    }

    @JmsListener(destination = "ActiveMQ.Advisory.MessageConsumed.Topic.>")
    public void processAdvisoryMessage(Message message) {
        System.out.println("processAdvisoryMessage Got a message");
    }
}

What am I doing wrong?