From users-return-49116-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Wed Jan 10 20:09:09 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 789CA18072F for ; Wed, 10 Jan 2018 20:09:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 682FC160C2E; Wed, 10 Jan 2018 19:09:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D3F90160C1E for ; Wed, 10 Jan 2018 20:09:08 +0100 (CET) Received: (qmail 47518 invoked by uid 500); 10 Jan 2018 19:09:02 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Delivered-To: moderator for users@activemq.apache.org Received: (qmail 79904 invoked by uid 99); 10 Jan 2018 18:44:54 -0000 X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 5.734 X-Spam-Level: ***** X-Spam-Status: No, score=5.734 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_ENVFROM_END_DIGIT=0.25, NML_ADSP_CUSTOM_MED=1.2, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URI_HEX=1.313, URI_TRY_3LD=1.999] autolearn=disabled Date: Wed, 10 Jan 2018 11:44:51 -0700 (MST) From: Mani To: users@activemq.apache.org Message-ID: <1515609891993-0.post@n4.nabble.com> Subject: Number of consumers incrementing after every reconnect MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I only have one consumer connected. With everytime I lose connection and reconnect, the "number of consumers" increments by 1 (i.e. +1) instead of just being one (i.e. Number of Consumers: 1). Does it has anything to do with idle_timeout? Please have a look at the code below. I even tried appending "wireFormat.maxInactivityDuration=30000" to the failover url but it did not help. Any help in debugging this further or guidance would be greatly appreciated! Thanks! class class1 : public proton::messaging_handler { std::string url; std::string devQueue; std::vector failovers = {"failover:(amqps://1.2.3.4)"}; public: class1(const std::string& u, const std::string& devQueue) : url(u), devQueue(devQueue) {} void on_container_start(proton::container& c) override { proton::connection_options co; proton::reconnect_options ro; ro.failover_urls(failovers); c.connect(url, co.idle_timeout(proton::duration::SECOND).reconnect(ro)); } void on_connection_open(proton::connection& c) override { c.open_receiver(devQueue); } ... }; -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html