You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by KevinC_UNR <am...@nein-seele.net> on 2011/01/04 23:20:29 UTC

Bug with DiscardingDLQBrokerPlugin reportInterval Not Used

I'm new to using ActiveMQ and the community so I'm not entirely sure about
how to go about submitting bug reports or patches... 

I have a project where I'm trying to use a BrokerService with the
DiscardingDLQBrokerPlugin in code, and I don't want/need the log messages
created for the number of discarded messages.

Eg:

broker_serv = new BrokerService();
plugins[] = new BrokerPlugin[1];
ddlq_plugin = new DiscardingDLQBrokerPlugin();
...
ddlq_plugin.setDropAll(true);
ddlq_plugin.setReportInterval(0);
plugins[0] = ddlq_plugin;

broker_serv.setPlugins(plugins);		
broker_serv.start();

Yet, in the DiscardingDLQBrokerPlugin the installPlugin() method doesn't
pass its reportInterval to the DiscardingDLQBroker it creates. So the
DiscardingDLQBroker uses its default reportingInterval of 1000, and no
matter what I do with ddlq_plugin.setReportInterval(x) the reporting
interval is always 1000.

This should be a simple fix by adding:

cb.setReportInterval(getReportInterval());

Somewhere between lines 56-61 in:
/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java

Related:
https://issues.apache.org/jira/browse/AMQ-1892


Thanks,
Kevin C.


-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Bug-with-DiscardingDLQBrokerPlugin-reportInterval-Not-Used-tp3174509p3174509.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Bug with DiscardingDLQBrokerPlugin reportInterval Not Used

Posted by Gary Tully <ga...@gmail.com>.
thanks for the feedback. I created
https://issues.apache.org/jira/browse/AMQ-3115 for you.
In the future, to submit a patch, just create and issue for the
ActiveMQ project and attach a diff with your changes.
https://issues.apache.org/jira/secure/CreateIssue!default.jspa

On 4 January 2011 22:20, KevinC_UNR <am...@nein-seele.net> wrote:
>
> I'm new to using ActiveMQ and the community so I'm not entirely sure about
> how to go about submitting bug reports or patches...
>
> I have a project where I'm trying to use a BrokerService with the
> DiscardingDLQBrokerPlugin in code, and I don't want/need the log messages
> created for the number of discarded messages.
>
> Eg:
>
> broker_serv = new BrokerService();
> plugins[] = new BrokerPlugin[1];
> ddlq_plugin = new DiscardingDLQBrokerPlugin();
> ...
> ddlq_plugin.setDropAll(true);
> ddlq_plugin.setReportInterval(0);
> plugins[0] = ddlq_plugin;
>
> broker_serv.setPlugins(plugins);
> broker_serv.start();
>
> Yet, in the DiscardingDLQBrokerPlugin the installPlugin() method doesn't
> pass its reportInterval to the DiscardingDLQBroker it creates. So the
> DiscardingDLQBroker uses its default reportingInterval of 1000, and no
> matter what I do with ddlq_plugin.setReportInterval(x) the reporting
> interval is always 1000.
>
> This should be a simple fix by adding:
>
> cb.setReportInterval(getReportInterval());
>
> Somewhere between lines 56-61 in:
> /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java
>
> Related:
> https://issues.apache.org/jira/browse/AMQ-1892
>
>
> Thanks,
> Kevin C.
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Bug-with-DiscardingDLQBrokerPlugin-reportInterval-Not-Used-tp3174509p3174509.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com
http://fusesource.com