Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11D511099F for ; Thu, 28 Nov 2013 08:17:46 +0000 (UTC) Received: (qmail 27482 invoked by uid 500); 28 Nov 2013 08:17:44 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 26918 invoked by uid 500); 28 Nov 2013 08:17:38 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 26787 invoked by uid 99); 28 Nov 2013 08:17:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Nov 2013 08:17:35 +0000 Date: Thu, 28 Nov 2013 08:17:35 +0000 (UTC) From: "Rob Davies (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (AMQ-4906) advisory producerCount = 0 is not received on temporary queue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rob Davies reassigned AMQ-4906: ------------------------------- Assignee: Rob Davies > advisory producerCount = 0 is not received on temporary queue > ------------------------------------------------------------- > > Key: AMQ-4906 > URL: https://issues.apache.org/jira/browse/AMQ-4906 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.7.0 > Reporter: Christian Mamen > Assignee: Rob Davies > > i notice i never receive producer advisory messages (ActiveMQ.Advisory.Producer.Queue .[...]) with producerCount=0 when the client message producers on temporary queue are closed. i do receive producerCount > 0. > However, the consumerCount (from ActiveMQ.Advisory.Consumer.Queue.[...]) appears to work as expected. > From looking into org.apache.activemq.advisory.AdvisoryBroker.java > {code} > @Override > public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception { > super.removeProducer(context, info); > // Don't advise advisory topics. > ActiveMQDestination dest = info.getDestination(); > if (info.getDestination() != null && !AdvisorySupport.isAdvisoryTopic(dest)) { > ActiveMQTopic topic = AdvisorySupport.getProducerAdvisoryTopic(dest); > producers.remove(info.getProducerId()); > if (!dest.isTemporary() || destinations.contains(dest)) { // PLEASE NOTE: <== could this actually be destinations.containsKey(dest) > fireProducerAdvisory(context, dest,topic, info.createRemoveCommand()); > } > } > } > {code} > as reference, the "working" removeConsumer method: > {code} > @Override > public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { > super.removeConsumer(context, info); > // Don't advise advisory topics. > ActiveMQDestination dest = info.getDestination(); > if (!AdvisorySupport.isAdvisoryTopic(dest)) { > ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(dest); > consumers.remove(info); > if (!dest.isTemporary() || destinations.containsKey(dest)) { > fireConsumerAdvisory(context,dest, topic, info.createRemoveCommand()); > } > } > } > {code} > Please note the destinations.containsKey(dest) vs destinations.contains(dest) (for concurrentHashMaps this is identical to containsValue()). I'm assuming the logic is to make sure the producer destination do exist in both cases > I tested this with 5.7.0. the code is similar in 5.9.0 -- This message was sent by Atlassian JIRA (v6.1#6144)