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 766D817CA6 for ; Mon, 20 Oct 2014 10:41:59 +0000 (UTC) Received: (qmail 57974 invoked by uid 500); 20 Oct 2014 10:41:59 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 57923 invoked by uid 500); 20 Oct 2014 10:41:59 -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 57911 invoked by uid 99); 20 Oct 2014 10:41:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2014 10:41:58 +0000 X-ASF-Spam-Status: No, hits=4.0 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX,URI_TRY_3LD,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gary.tully@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; Mon, 20 Oct 2014 10:41:31 +0000 Received: by mail-ie0-f172.google.com with SMTP id rl12so4389192iec.31 for ; Mon, 20 Oct 2014 03:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+J3i0gb6MHChd+ZPCzmaniu8ClaTxmSUYfMfRHSlPYY=; b=MhYrYhp9KViSWL7Wb9XQGMRfki9LlE02JAlzTZ3HGC5xzTqm9e0aMHT0O/qqeyI0qF 3HwSNoMk8LiuH5l5XebaDye5MjH4Dvj8FT0NK40nIMARQYrNMWfhZRyaXX7yguH+lQvH 9lq7w242euF2YhFpHy3u8ZZcF4+ZJMceeZikwez1g9yGzqR5A/nhYy7Mro07pm3Sw6CY onQFKMns332fvGUYn0Wynm9Oe0gNQAdaSRKNBaZVCHg3/awNkFkwTkVfovJW+h9dsrQ4 gAAOdWy25JJVWllvvv/78jLBBqlwE30gsqbHEYqqjUL8j1DOAvYiYr1eFoN9h3qnatgt fKqg== MIME-Version: 1.0 X-Received: by 10.50.79.166 with SMTP id k6mr17121044igx.0.1413801689791; Mon, 20 Oct 2014 03:41:29 -0700 (PDT) Received: by 10.64.15.98 with HTTP; Mon, 20 Oct 2014 03:41:29 -0700 (PDT) In-Reply-To: References: <1413566238746-4686510.post@n4.nabble.com> Date: Mon, 20 Oct 2014 11:41:29 +0100 Message-ID: Subject: Re: How do I configure a automatic expiration for DLQ From: Gary Tully To: "users@activemq.apache.org" Content-Type: multipart/alternative; boundary=089e013a114e80c3380505d85bb6 X-Virus-Checked: Checked by ClamAV on apache.org --089e013a114e80c3380505d85bb6 Content-Type: text/plain; charset=UTF-8 yes. periodic expiry processing. controlled by destination policy expireMessagesPeriod > 0 On 17 October 2014 22:12, Tim Bain wrote: > Those plugin modifications will get the message into the DLQ with an > expiration date, but is there anything that will cause messages in the DLQ > to be deleted when they expire? Or will Gopal also need to implement > something to do that? > > On Fri, Oct 17, 2014 at 2:28 PM, Gary Tully wrote: > > > the main meat is in: > > > > > https://github.com/apache/activemq/blob/d54e0d6ab590b6a6148a5e2629c45b95d3f40eb8/activemq-broker/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java#L47 > > > > maybe an option in there will give you a quick win, do what regionBroker > > does but set an expiration. > > > > On 17 October 2014 21:25, Gary Tully wrote: > > > > > you really need an enhancement of your own plugin that will implement > > > sendToDeadLetterQueue b/c the current impl will clear the expiration of > > the > > > message, so it is in theory not possible for a message sent to the DLQ, > > to > > > expire. > > > > > > > > > > > > https://github.com/apache/activemq/blob/d54e0d6ab590b6a6148a5e2629c45b95d3f40eb8/activemq-broker/src/main/java/org/apache/activemq/broker/region/RegionBroker.java#L744 > > > > > > A little plugin may be the answer - a variant of the > > discardingDLQBrokerPlugin > > > should be easy to hack up, maybe add a configurable expiry to that > plugin > > > and submit a patch. > > > > > > > > > > > > https://github.com/apache/activemq/blob/d54e0d6ab590b6a6148a5e2629c45b95d3f40eb8/activemq-broker/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java > > > > > > > > > On 17 October 2014 18:17, gchakra wrote: > > > > > >> 1.For the dead letter queue ActiveMQ.DLQ, I would like to configure a > > >> policy > > >> whereby messages in DLQ get deleted after they have resided in DLQ > for 5 > > >> days. > > >> I couldnt see how to do it in the documentation. > > >> My current activemq.xml configuration file is below...how do I modify > it > > >> for > > >> autoexpiring my DLQ messages after 5 days... > > >> > > >> > > >> > >> xmlns:amq="http://activemq.apache.org/schema/core" > > >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > >> xsi:schemaLocation="http://www.springframework.org/schema/beans > > >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > > >> http://activemq.apache.org/schema/core > > >> http://activemq.apache.org/schema/core/activemq-core.xsd"> > > >> > >> > > >> > > > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> > > >> > > >> > > >> file:${activemq.base}/conf/credentials.properties > > >> > > >> > > >> > >> brokerName="localhost" dataDirectory="${activemq.base}/data" > > >> destroyApplicationContextOnStop="true"> > > >> > > >> > > >> > > >> > >> producerFlowControl="false" memoryLimit="1mb" > > >> useCache="false"> > > >> > > > > >> > > >> > > > > >> > > >> > >> producerFlowControl="false" memoryLimit="1mb" > > >> useCache="false"> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> directory="${activemq.base}/data/kahadb" > > >> ignoreMissingJournalfiles="true" checkForCorruptJournalFiles="true" > > >> checksumJournalFiles="true" journalMaxFileLength="64mb" /> > > >> > > >> > > >> uri="tcp:// > > >> 0.0.0.0:61616"/> > > >> > > >> > > >> > > >> > > >> > > >> > > >> 2. What is the impact of adding the following plugin to the broker in > > >> activemq.xml configuration XML > > >> > >> brokerName="localhost" dataDirectory="$ > > >> {activemq.base}/data" destroyApplicationContextOnStop="true"> > > >> > > >> > >> dropTemporaryQueues="true" /> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> -- > > >> View this message in context: > > >> > > > http://activemq.2283324.n4.nabble.com/How-do-I-configure-a-automatic-expiration-for-DLQ-tp4686510.html > > >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > >> > > > > > > > > > --089e013a114e80c3380505d85bb6--