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 8E25F10476 for ; Wed, 8 May 2013 01:35:16 +0000 (UTC) Received: (qmail 4010 invoked by uid 500); 8 May 2013 01:35:16 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 3918 invoked by uid 500); 8 May 2013 01:35:16 -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 3904 invoked by uid 99); 8 May 2013 01:35:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 May 2013 01:35:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.n.gale@gmail.com designates 209.85.219.46 as permitted sender) Received: from [209.85.219.46] (HELO mail-oa0-f46.google.com) (209.85.219.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 May 2013 01:35:11 +0000 Received: by mail-oa0-f46.google.com with SMTP id h2so1460298oag.19 for ; Tue, 07 May 2013 18:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=pZ22EShiuVLuXO/qz0ruirTUXHo9Kqrsqc+e2RgJMCg=; b=tx713MP0NGisNsvGtwTJNk+qqBvVweM7MzqHSagP4ft6WUWSeO74EpA2nW5lgrLl/K Zw1ePJIvY5kTECTf0Xw4LVQFW0n2CFiW6mQaL2v7Cp6HiOKihJ6TwmAKpJ4jBGGEyxLl hTtHOSmoifJoQAduL0JNW0LZ9a+vGdMFDEb/hqJIvW+hqwTDjbjaNU3W8JLmSJE+Qf97 Q0khvKu4yjL+R5ztuP6mSKnWpQWOrNzTgClmbujlFX4b9Q1JbWueczBnBE6e/QPLHdmL mNXLdaLK3qo2G1z4Bum6rQ/yBbVYqeVT3OrpgBlxVUWFgMzOTtuZ5jStFSn8y5DLJDKK 7NdA== X-Received: by 10.182.24.5 with SMTP id q5mr1304344obf.97.1367976890989; Tue, 07 May 2013 18:34:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.141.232 with HTTP; Tue, 7 May 2013 18:34:20 -0700 (PDT) In-Reply-To: References: From: Paul Gale Date: Tue, 7 May 2013 21:34:20 -0400 Message-ID: Subject: Re: Configuring common defaults for topics and queues. To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=001a11c2af90a6086204dc2af091 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2af90a6086204dc2af091 Content-Type: text/plain; charset=UTF-8 Hi Christian, So after looking through ActiveMQ's code it would appear that my understanding of what constitutes a 'default entry*'* is not what I had previously thought. As stated previously I thought that a 'default entry' was used to define default configuration values that would be subsequently * inherited* by specific topic and queue policy entries. The idea being that these policy entries could optionally override these configuration values. In other words I was interpreting 'default' to mean 'base'. This I now know, is wrong. It turns out that the default entry is not used for inheriting configuration at all. Rather it is used (if defined) to configure either a topic or queue destination when there is no corresponding destination policy. Searching for a corresponding destination policy involves wildcard matching the list of policy entries. Given that I have wildcard policy entries for both topics and queues with the widest possible scope ('>') the defaultEntry will NEVER be used, as the wildcard always results in a match. Below is the only place that the defaultEntry is retrieved (in PolicyMap.java): public PolicyEntry getEntryFor(ActiveMQDestination destination) { PolicyEntry answer = (PolicyEntry) chooseValue(destination); if (answer == null) { answer = getDefaultEntry(); } return answer; } Do you concur with my findings? Thanks, Paul On Tue, May 7, 2013 at 11:42 AM, Christian Posta wrote: > Paul, > > Looks like you have a policy for all queues and all topics too... So the > default policy won't get used for those destinations. I think you also have > to specify a "topic" or "queue" for default entry, even though it gets > ignored. > > > On Tue, May 7, 2013 at 8:09 AM, Paul Gale wrote: > > > Hi, > > > > In an attempt to DRY up my ActiveMQ configuration I realized that, > > according to the activemq-core schema, it's possible to configure common > > defaults for both topics and queues as shown in the snippet below. I have > > this defined in my activemq.xml currently. > > > > Whilst ActiveMQ does not fail the schema validation on startup I still > > don't know whether ActiveMQ has honored these settings or has ignored > them. > > I have not come across any references to this method of configuring > common > > defaults, nor do I have a way to verify that said configuration has taken > > effect the way I think it has, short of relying on any explicit logging > > statements. Would exploring ActiveMQ's MBeans via JMX be the best method > > for verification? > > > > Can one of the committers comment on the legality of this syntax? > > > > Thanks, > > Paul > > > > > ____________________________________________________________________________________________________ > > > > > > > > > > > advisoryWhenFull="true" > > advisoryForFastProducers="true" > > advisoryForSlowConsumers="true" > > advisoryForDiscardingMessages="true" > > optimizedDispatch="true"> > > > > > topicPrefix="DLQ." > > processExpired="false" > > > useQueueForQueueMessages="true" > > > useQueueForTopicMessages="true" > > > > destinationPerDurableSubscriber="false"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > *Christian Posta* > http://www.christianposta.com/blog > twitter: @christianposta > --001a11c2af90a6086204dc2af091--