You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Filip Hanik (JIRA)" <ji...@apache.org> on 2008/08/16 00:41:52 UTC

[jira] Created: (AMQ-1892) Broker plugin to allow automatic discarding of the items being sent to the dead letter queue

Broker plugin to allow automatic discarding of the items being sent to the dead letter queue
--------------------------------------------------------------------------------------------

                 Key: AMQ-1892
                 URL: https://issues.apache.org/activemq/browse/AMQ-1892
             Project: ActiveMQ
          Issue Type: New Feature
          Components: Broker
    Affects Versions: 5.1.0, 5.0.0
            Reporter: Filip Hanik
             Fix For: 5.2.0
         Attachments: discarding-dlq-plugin.zip

A very simple, yet very useful plugin to the broker. This allows one to configure queues and topics, all or matched based on regular expressions, to drop messages being sent to the DLQ

extremely useful when one uses constant pending message limit strategy or the other eviction rules, but don't want to incur the overhead of yet another consumer to clear the DLQ

Configuration looks like

     <plugins>
       <bean
         xmlns="http://www.springframework.org/schema/beans"
         id="discardingDlqBroker"
         class="org.apache.activemq.plugin.DiscardingDLQBroker">
 
         <property name="dropAll" value="true"/>
         <property name="dropTemporaryTopics" value="true"/>
         <property name="dropTemporaryQueues" value="true"/>
 
         <!--drops by destination name, using java regular expressions
             http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
             delimited by spaces, so destination names cannot contain spaces
         <property name="dropOnly" value="topic_1 queue_1"/>
         -->
 
         <!--how frequently do we output how many messages we have dropped - use 0 for disable-->
         <property name="reportInterval" value="1000"/>
       </bean>
     </plugins>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1892) Broker plugin to allow automatic discarding of the items being sent to the dead letter queue

Posted by "Brett Humphreys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55074#action_55074 ] 

Brett Humphreys commented on AMQ-1892:
--------------------------------------

The above description isn't correct.  To use this within a XBean configuration file you'd want to do the following:

               <plugins>
			<bean xmlns="http://www.springframework.org/schema/beans" id="discardingDlqBroker"
				class="org.apache.activemq.plugin.DiscardingDLQBrokerPlugin">
				<property name="dropAll" value="true" />
				<property name="dropTemporaryTopics" value="true" />
				<property name="dropTemporaryQueues" value="true" />
			</bean>
		</plugins>

The difference being that the class used is the *Plugin* not the raw filter.  

Full description of this problem, and what the exception looks like when you use the wrong class can be found on this AMQ user thread:
http://mail-archives.apache.org/mod_mbox/activemq-users/200905.mbox/%3C904249.9763.qm@web50804.mail.re2.yahoo.com%3E

> Broker plugin to allow automatic discarding of the items being sent to the dead letter queue
> --------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1892
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1892
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 5.0.0, 5.1.0
>            Reporter: Filip Hanik
>            Assignee: Rob Davies
>             Fix For: 5.2.0
>
>         Attachments: discarding-dlq-plugin.zip
>
>
> A very simple, yet very useful plugin to the broker. This allows one to configure queues and topics, all or matched based on regular expressions, to drop messages being sent to the DLQ
> extremely useful when one uses constant pending message limit strategy or the other eviction rules, but don't want to incur the overhead of yet another consumer to clear the DLQ
> Configuration looks like
>      <plugins>
>        <bean
>          xmlns="http://www.springframework.org/schema/beans"
>          id="discardingDlqBroker"
>          class="org.apache.activemq.plugin.DiscardingDLQBroker">
>  
>          <property name="dropAll" value="true"/>
>          <property name="dropTemporaryTopics" value="true"/>
>          <property name="dropTemporaryQueues" value="true"/>
>  
>          <!--drops by destination name, using java regular expressions
>              http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>              delimited by spaces, so destination names cannot contain spaces
>          <property name="dropOnly" value="topic_1 queue_1"/>
>          -->
>  
>          <!--how frequently do we output how many messages we have dropped - use 0 for disable-->
>          <property name="reportInterval" value="1000"/>
>        </bean>
>      </plugins>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1892) Broker plugin to allow automatic discarding of the items being sent to the dead letter queue

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1892.
-----------------------------

      Assignee: Rob Davies
    Resolution: Fixed

patch applied by SVN revision 692449

> Broker plugin to allow automatic discarding of the items being sent to the dead letter queue
> --------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1892
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1892
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 5.0.0, 5.1.0
>            Reporter: Filip Hanik
>            Assignee: Rob Davies
>             Fix For: 5.2.0
>
>         Attachments: discarding-dlq-plugin.zip
>
>
> A very simple, yet very useful plugin to the broker. This allows one to configure queues and topics, all or matched based on regular expressions, to drop messages being sent to the DLQ
> extremely useful when one uses constant pending message limit strategy or the other eviction rules, but don't want to incur the overhead of yet another consumer to clear the DLQ
> Configuration looks like
>      <plugins>
>        <bean
>          xmlns="http://www.springframework.org/schema/beans"
>          id="discardingDlqBroker"
>          class="org.apache.activemq.plugin.DiscardingDLQBroker">
>  
>          <property name="dropAll" value="true"/>
>          <property name="dropTemporaryTopics" value="true"/>
>          <property name="dropTemporaryQueues" value="true"/>
>  
>          <!--drops by destination name, using java regular expressions
>              http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
>              delimited by spaces, so destination names cannot contain spaces
>          <property name="dropOnly" value="topic_1 queue_1"/>
>          -->
>  
>          <!--how frequently do we output how many messages we have dropped - use 0 for disable-->
>          <property name="reportInterval" value="1000"/>
>        </bean>
>      </plugins>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.