protected void fireProducerAdvisory(ConnectionContext context,ActiveMQDestination producerDestination, ActiveMQTopic topic, Command command) throws Exception {
fireProducerAdvisory(context,producerDestination, topic, command, null);
}
protected void fireProducerAdvisory(ConnectionContext context, ActiveMQDestination producerDestination,ActiveMQTopic topic, Command command, ConsumerId targetConsumerId) throws Exception {
ActiveMQMessage advisoryMessage = new ActiveMQMessage();
int count = 0;
if (producerDestination != null) {
Set<Destination> set = getDestinations(producerDestination);
if (set != null) {
for (Destination dest : set) {
count += dest.getDestinationStatistics().getProducers().getCount();
}
}
}
advisoryMessage.setIntProperty("producerCount", count);
fireAdvisory(context, topic, command, targetConsumerId, advisoryMessage);
}