Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 651CD1065E for ; Thu, 10 Oct 2013 05:31:15 +0000 (UTC) Received: (qmail 77028 invoked by uid 500); 10 Oct 2013 05:31:12 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 77005 invoked by uid 500); 10 Oct 2013 05:31:11 -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 Received: (qmail 76981 invoked by uid 99); 10 Oct 2013 05:31:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 05:31:04 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of seijoed@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 05:30:59 +0000 Received: by mail-ie0-f172.google.com with SMTP id x13so4179853ief.3 for ; Wed, 09 Oct 2013 22:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=1/ZG4zPt/z8IIcNH1k8PPDf3/ddNyJaB6DOdyfffJ4U=; b=ctu7zhaLm1YILJQlw2IaUA5rBlK4lTic6N/T18yC49NiTO3jgF87Vp1b+h5JigpC4j tUcoB5oJaJTBgZz8AW8cN+zfqaeDAPsr0vW0y69B0NB1ja3cNOo6zxB47DtwkPI6i8lh xbVG74EPkOgkh/z8A7nJSuX2sc2s+sCcLb9iYI8s5DVshuYlQbRKe2DmAJ/jnJKOBnX1 0wChwae5hOjE4rfcBdfh4D/VvKpoSr8+uGmcPwfSyALzIIB43+s2FAnDy4YRhNb2YOb3 O9lxRMXV5dILEMyfjJoQtSxG5qEK/znjqzs22VkyJPTbm3fOGk4r9QthFk03Jb5s5Tjf t0fA== X-Received: by 10.50.13.104 with SMTP id g8mr5026699igc.30.1381383038438; Wed, 09 Oct 2013 22:30:38 -0700 (PDT) Received: from [192.168.15.18] (71-211-189-29.hlrn.qwest.net. [71.211.189.29]) by mx.google.com with ESMTPSA id ir7sm11537549igb.8.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 22:30:33 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: Too many advisories topics created in ActiveMQ From: Johan Edstrom In-Reply-To: <4CB65FB8-1361-48AB-9782-E11586150C5F@gmail.com> Date: Wed, 9 Oct 2013 23:30:31 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <844BBC72-56A9-4C33-B218-2473092A41C3@gmail.com> References: <1381378292338-4672501.post@n4.nabble.com> <6FF1E7CE-3F09-4A6A-8E86-115973B1CDE5@gmail.com> <4CB65FB8-1361-48AB-9782-E11586150C5F@gmail.com> To: users@activemq.apache.org X-Mailer: Apple Mail (2.1510) X-Virus-Checked: Checked by ClamAV on apache.org Rob - that is actually what I was thinking :) What I normally do is=20 1 - Use camel - Unless there is a specific use-case for batching / TX = most modern systems tend to be record oriented. 1.5 - If you need by record and ordering you are doing something = wrong :) 2 - Separate connectionFactories and rely on the beauty of NIO in AMQ. 2.1 - Don't use PooledConnectionFactory for both listening and = producing, it'll just give you migraines. 3 - Look at the specific use-case, is this volume or size or both - = That'll lead to concurrent consuming and prefetch. 4 - Most likely since this is 1.4 J2EE compatible, disable compression, = wire changes, whatnot else. 5 - Make your request reply happen in two different Executors, with two = separate runnables, respect the Correlation ID 5.1 - You can use one queue.=20 5.2 - If you use temp destinations, use the correlation and keep the = queue (You get cleanup for free). Look at volume produced vs. consumed. - What is a Request reply actually = in terms of work? That last one is hard, that is the key to scaling systems as you left = the world of=20 Person findPerson(Number id); (You can infer british rock here.) Just some ideas of the top of my head... On Oct 9, 2013, at 11:14 PM, Johan Edstrom wrote: > As Rob pointed out, there are several solutions to this, the simplest = one=20 > being as in the old joke, Dr, it hurts when I do this. - Don't do it? >=20 > You could achieve the same thing with one queue and selectors - *which = could run CPU up* > You could use a temp queue per processing unit and handle a lot of = messages (This is nice for pub/sub) > You could use one queue and a bit of instanceof code (It looks a bit = crufty but it is very functional) >=20 >=20 > On Oct 9, 2013, at 11:05 PM, Robert Davies = wrote: >=20 >> What you have described is a bit of an anti-pattern - there's some = guidelines here in the faq: = http://activemq.apache.org/how-should-i-implement-request-response-with-jm= s.html >> Its an anti-pattern because there is a lot of broker side over head = with creating temporary destinations and consumers (as you are seeing).=20= >> However, for your case you probably need to enable GC on destinations = - see http://activemq.apache.org/delete-inactive-destinations.html >>=20 >> On 10 Oct 2013, at 05:11, javaG wrote: >>=20 >>>=20 >>> In my application, I use request-reply by creating temp queue and = creating a >>> new replyConsumer for each message to use replyConsumer.poll() = method to get >>> reply back. After getting reply I close the replyConsumer. Messaging = works >>> fine but each time a message is sent a topic >>> ActiveMQ.Advisory.Consumer.Queue.ID:xxxxxxxxxxxxxx is created and = remains >>> there. So if millions of messages are sent millions of rows will be = created >>> in the ActiveMQ web console for topics. I tried to disable = advisories >>> message to solve this problem but then request-reply does not work = anymore >>> as it throws exceptions like Cannot publish to a deleted = destination. So I >>> am stuck. Any one has a solution? >>>=20 >>> Thanks >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>> -- >>> View this message in context: = http://activemq.2283324.n4.nabble.com/Too-many-advisories-topics-created-i= n-ActiveMQ-tp4672501.html >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>=20 >=20