You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kimmking <ki...@gmail.com> on 2014/08/28 15:59:58 UTC

Re: redeliveryPlugin seems to have problems with defaultEntry

Use wildcard ">" to replace  "*"  for property "queue"



--
View this message in context: http://activemq.2283324.n4.nabble.com/redeliveryPlugin-seems-to-have-problems-with-defaultEntry-tp4685094p4685102.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: redeliveryPlugin seems to have problems with defaultEntry

Posted by preben <pr...@gmail.com>.
Thanks. 
Lot of amq switches 

The trick is to set broker url =
failover:(tcp://localhost:61616)?jms.rmIdFromConnectionId=true&jms.prefetchPolicy.all=1&randomize=false&jms.redeliveryPolicy.maximumRedeliveries=0

to disable client side redelivery, and let the broker take control.

2014-09-03 12:57:02,545 | INFO  | ActiveMQ WebConsole available at
http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main
2014-09-03 12:57:02,618 | INFO  | Initializing Spring FrameworkServlet
'dispatcher' | /admin | main
2014-09-03 12:57:02,620 | INFO  | FrameworkServlet 'dispatcher':
initialization started | org.springframework.web.servlet.DispatcherServlet |
main
2014-09-03 12:57:02,663 | INFO  | Refreshing WebApplicationContext for
namespace 'dispatcher-servlet': startup date [Wed Sep 03 12:57:02 CEST
2014]; parent: Root WebApplicationContext |
org.springframework.web.context.support.XmlWebApplicationContext | main
2014-09-03 12:57:02,665 | INFO  | Loading XML bean definitions from
ServletContext resource [/WEB-INF/dispatcher-servlet.xml] |
org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
2014-09-03 12:57:02,696 | INFO  | Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1393f867:
defining beans
[handlerMapping,/createDestination.action,/deleteDestination.action,/createSubscriber.action,/deleteSubscriber.action,/sendMessage.action,/purgeDestination.action,/deleteMessage.action,/copyMessage.action,/moveMessage.action,/deleteJob.action,exceptionResolver];
parent:
org.springframework.beans.factory.support.DefaultListableBeanFactory@b43f35f
| org.springframework.beans.factory.support.DefaultListableBeanFactory |
main
2014-09-03 12:57:02,906 | INFO  | FrameworkServlet 'dispatcher':
initialization completed in 284 ms |
org.springframework.web.servlet.DispatcherServlet | main
2014-09-03 12:57:03,160 | INFO  | jolokia-agent: No access restrictor found
at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api |
main
2014-09-03 12:57:41,948 | TRACE | redelivery #1 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 1000, dest: queue://demo
| org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ Transport:
tcp:///127.0.0.1:49669@61616
2014-09-03 12:57:42,168 | TRACE | redelivery #2 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 2000, dest: queue://demo
| org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ Transport:
tcp:///127.0.0.1:49669@61616
2014-09-03 12:57:44,116 | TRACE | redelivery #3 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 4000, dest: queue://demo
| org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ Transport:
tcp:///127.0.0.1:49669@61616
2014-09-03 12:57:48,094 | TRACE | redelivery #4 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 8000, dest: queue://demo
| org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ Transport:
tcp:///127.0.0.1:49669@61616
2014-09-03 12:57:56,095 | TRACE | redelivery #5 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 16000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:49669@61616
2014-09-03 12:58:12,067 | TRACE | redelivery #6 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 32000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:49669@61616
2014-09-03 12:58:44,209 | TRACE | redelivery #7 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 64000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:49669@61616
2014-09-03 12:59:48,189 | TRACE | redelivery #8 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 128000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:49669@61616
2014-09-03 13:01:56,090 | TRACE | redelivery #9 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 256000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:49669@61616
2014-09-03 13:06:12,175 | TRACE | redelivery #10 of:
ID:A70103-56018-1409741049739-3:1:2:1:1 with delay: 512000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:49669@61616

Defaultentry also ok.

Btw. Fifo ordering seems to go down the drain with broker redelivery.
If a message gets redelivered other messages that comes in "that are ok"
will be send on to the client even though there are messages being
redelivered.

/preben



--
View this message in context: http://activemq.2283324.n4.nabble.com/redeliveryPlugin-seems-to-have-problems-with-defaultEntry-tp4685094p4685258.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: redeliveryPlugin seems to have problems with defaultEntry

Posted by Timothy Bish <ta...@gmail.com>.
On 09/01/2014 03:14 AM, preben wrote:
> Good point.
>
> I deleted the whole kahadb+tmp directory and started with a clean running
> server, but the results are the same.
>
> I'm still getting the default 6 amq redeliveries and then the broker
> redelivery pluging kicks in on 7-10.
>
> 2014-09-01 09:01:10,224 | INFO  | Refreshing Root WebApplicationContext:
> startup date [Mon Sep 01 09:01:10 CEST 2014]; root of context hierarchy |
> org.springframework.web.context.support.XmlWebApplicationContext | main
> 2014-09-01 09:01:10,229 | INFO  | Loading XML bean definitions from
> ServletContext resource [/WEB-INF/webconsole-embedded.xml] |
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
> 2014-09-01 09:01:10,290 | INFO  | Loading XML bean definitions from
> ServletContext resource [/WEB-INF/webconsole-query.xml] |
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
> 2014-09-01 09:01:10,332 | INFO  | Loading properties file from URL
> [file:C:/java/apache-activemq-5.10.0/bin/../conf/credentials.properties] |
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer |
> main
> 2014-09-01 09:01:10,383 | INFO  | Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@3d925789:
> defining beans
> [queueBrowser,messageQuery,queueConsumerQuery,queueProducerQuery,topicProducerQuery,topicSubscriberQuery,connectionQuery,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,brokerQuery,sessionPool,connectionFactory];
> root of factory hierarchy |
> org.springframework.beans.factory.support.DefaultListableBeanFactory | main
> 2014-09-01 09:01:10,512 | INFO  | ActiveMQ WebConsole available at
> http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main
> 2014-09-01 09:01:10,590 | INFO  | Initializing Spring FrameworkServlet
> 'dispatcher' | /admin | main
> 2014-09-01 09:01:10,592 | INFO  | FrameworkServlet 'dispatcher':
> initialization started | org.springframework.web.servlet.DispatcherServlet |
> main
> 2014-09-01 09:01:10,609 | INFO  | Refreshing WebApplicationContext for
> namespace 'dispatcher-servlet': startup date [Mon Sep 01 09:01:10 CEST
> 2014]; parent: Root WebApplicationContext |
> org.springframework.web.context.support.XmlWebApplicationContext | main
> 2014-09-01 09:01:10,610 | INFO  | Loading XML bean definitions from
> ServletContext resource [/WEB-INF/dispatcher-servlet.xml] |
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
> 2014-09-01 09:01:10,641 | INFO  | Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@462f59c8:
> defining beans
> [handlerMapping,/createDestination.action,/deleteDestination.action,/createSubscriber.action,/deleteSubscriber.action,/sendMessage.action,/purgeDestination.action,/deleteMessage.action,/copyMessage.action,/moveMessage.action,/deleteJob.action,exceptionResolver];
> parent:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@3d925789
> | org.springframework.beans.factory.support.DefaultListableBeanFactory |
> main
> 2014-09-01 09:01:10,790 | INFO  | FrameworkServlet 'dispatcher':
> initialization completed in 189 ms |
> org.springframework.web.servlet.DispatcherServlet | main
> 2014-09-01 09:01:11,067 | INFO  | jolokia-agent: No access restrictor found
> at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api |
> main
> 2014-09-01 09:02:54,797 | TRACE | redelivery #7 of:
> ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 10000, dest:
> queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
> Transport: tcp:///127.0.0.1:54805@61616
> 2014-09-01 09:03:04,142 | TRACE | redelivery #8 of:
> ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 20000, dest:
> queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
> Transport: tcp:///127.0.0.1:54805@61616
> 2014-09-01 09:03:24,082 | TRACE | redelivery #9 of:
> ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 40000, dest:
> queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
> Transport: tcp:///127.0.0.1:54805@61616
> 2014-09-01 09:04:04,099 | TRACE | redelivery #10 of:
> ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 80000, dest:
> queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
> Transport: tcp:///127.0.0.1:54805@61616
>
>
> So there seems to be 2 problems here.
> The defaultEntry is not taken into account
> The RedeliveryPlugin waits to kick in when the amq default redeliveries have
> completed.
>
> Btw I'm running the setup on a jee server using the jca adapter with broker
> connect =
> failover:(tcp://localhost:61616)?jms.rmIdFromConnectionId=true&jms.prefetchPolicy.all=1&randomize=false
>
> That seems to work ok with reconnect and all.
>
> Best,
> Preben
> This seems to work ok
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/redeliveryPlugin-seems-to-have-problems-with-defaultEntry-tp4685094p4685199.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
You need to configure your client to have zero redeliver attempts so 
that the Broker will kick in immediately, otherwise you have to wait for 
the client to perform its local max redelivery tries.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: redeliveryPlugin seems to have problems with defaultEntry

Posted by preben <pr...@gmail.com>.
Good point.

I deleted the whole kahadb+tmp directory and started with a clean running
server, but the results are the same.

I'm still getting the default 6 amq redeliveries and then the broker
redelivery pluging kicks in on 7-10.

2014-09-01 09:01:10,224 | INFO  | Refreshing Root WebApplicationContext:
startup date [Mon Sep 01 09:01:10 CEST 2014]; root of context hierarchy |
org.springframework.web.context.support.XmlWebApplicationContext | main
2014-09-01 09:01:10,229 | INFO  | Loading XML bean definitions from
ServletContext resource [/WEB-INF/webconsole-embedded.xml] |
org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
2014-09-01 09:01:10,290 | INFO  | Loading XML bean definitions from
ServletContext resource [/WEB-INF/webconsole-query.xml] |
org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
2014-09-01 09:01:10,332 | INFO  | Loading properties file from URL
[file:C:/java/apache-activemq-5.10.0/bin/../conf/credentials.properties] |
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer |
main
2014-09-01 09:01:10,383 | INFO  | Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@3d925789:
defining beans
[queueBrowser,messageQuery,queueConsumerQuery,queueProducerQuery,topicProducerQuery,topicSubscriberQuery,connectionQuery,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,brokerQuery,sessionPool,connectionFactory];
root of factory hierarchy |
org.springframework.beans.factory.support.DefaultListableBeanFactory | main
2014-09-01 09:01:10,512 | INFO  | ActiveMQ WebConsole available at
http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main
2014-09-01 09:01:10,590 | INFO  | Initializing Spring FrameworkServlet
'dispatcher' | /admin | main
2014-09-01 09:01:10,592 | INFO  | FrameworkServlet 'dispatcher':
initialization started | org.springframework.web.servlet.DispatcherServlet |
main
2014-09-01 09:01:10,609 | INFO  | Refreshing WebApplicationContext for
namespace 'dispatcher-servlet': startup date [Mon Sep 01 09:01:10 CEST
2014]; parent: Root WebApplicationContext |
org.springframework.web.context.support.XmlWebApplicationContext | main
2014-09-01 09:01:10,610 | INFO  | Loading XML bean definitions from
ServletContext resource [/WEB-INF/dispatcher-servlet.xml] |
org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
2014-09-01 09:01:10,641 | INFO  | Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@462f59c8:
defining beans
[handlerMapping,/createDestination.action,/deleteDestination.action,/createSubscriber.action,/deleteSubscriber.action,/sendMessage.action,/purgeDestination.action,/deleteMessage.action,/copyMessage.action,/moveMessage.action,/deleteJob.action,exceptionResolver];
parent:
org.springframework.beans.factory.support.DefaultListableBeanFactory@3d925789
| org.springframework.beans.factory.support.DefaultListableBeanFactory |
main
2014-09-01 09:01:10,790 | INFO  | FrameworkServlet 'dispatcher':
initialization completed in 189 ms |
org.springframework.web.servlet.DispatcherServlet | main
2014-09-01 09:01:11,067 | INFO  | jolokia-agent: No access restrictor found
at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api |
main
2014-09-01 09:02:54,797 | TRACE | redelivery #7 of:
ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 10000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:54805@61616
2014-09-01 09:03:04,142 | TRACE | redelivery #8 of:
ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 20000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:54805@61616
2014-09-01 09:03:24,082 | TRACE | redelivery #9 of:
ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 40000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:54805@61616
2014-09-01 09:04:04,099 | TRACE | redelivery #10 of:
ID:A70103-54804-1409554907290-3:1:1:1:1 with delay: 80000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:54805@61616


So there seems to be 2 problems here.
The defaultEntry is not taken into account
The RedeliveryPlugin waits to kick in when the amq default redeliveries have
completed. 

Btw I'm running the setup on a jee server using the jca adapter with broker
connect =
failover:(tcp://localhost:61616)?jms.rmIdFromConnectionId=true&jms.prefetchPolicy.all=1&randomize=false

That seems to work ok with reconnect and all.

Best,
Preben
This seems to work ok



--
View this message in context: http://activemq.2283324.n4.nabble.com/redeliveryPlugin-seems-to-have-problems-with-defaultEntry-tp4685094p4685199.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: redeliveryPlugin seems to have problems with defaultEntry

Posted by artnaseef <ar...@artnaseef.com>.
On the test run that produced the log messages starting with redelivery #7,
was the entire test setup restarted fresh?

If not, try removing the entire kahadb, restart the clients, and try again.



--
View this message in context: http://activemq.2283324.n4.nabble.com/redeliveryPlugin-seems-to-have-problems-with-defaultEntry-tp4685094p4685149.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: redeliveryPlugin seems to have problems with defaultEntry

Posted by preben <pr...@gmail.com>.
After turning tracing on it seems even more odd.
The redelivery plugin kicks in on redelivery 7. Seems that amq default
redelivery takes presens here


2014-08-29 14:23:52,927 | INFO  | ActiveMQ WebConsole available at
http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main
2014-08-29 14:23:53,037 | INFO  | Initializing Spring FrameworkServlet
'dispatcher' | /admin | main
2014-08-29 14:23:53,039 | INFO  | FrameworkServlet 'dispatcher':
initialization started | org.springframework.web.servlet.DispatcherServlet |
main
2014-08-29 14:23:53,050 | INFO  | Refreshing WebApplicationContext for
namespace 'dispatcher-servlet': startup date [Fri Aug 29 14:23:53 CEST
2014]; parent: Root WebApplicationContext |
org.springframework.web.context.support.XmlWebApplicationContext | main
2014-08-29 14:23:53,052 | INFO  | Loading XML bean definitions from
ServletContext resource [/WEB-INF/dispatcher-servlet.xml] |
org.springframework.beans.factory.xml.XmlBeanDefinitionReader | main
2014-08-29 14:23:53,124 | INFO  | Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@f9ede0e:
defining beans
[handlerMapping,/createDestination.action,/deleteDestination.action,/createSubscriber.action,/deleteSubscriber.action,/sendMessage.action,/purgeDestination.action,/deleteMessage.action,/copyMessage.action,/moveMessage.action,/deleteJob.action,exceptionResolver];
parent:
org.springframework.beans.factory.support.DefaultListableBeanFactory@1b5818f2
| org.springframework.beans.factory.support.DefaultListableBeanFactory |
main
2014-08-29 14:23:53,269 | INFO  | FrameworkServlet 'dispatcher':
initialization completed in 229 ms |
org.springframework.web.servlet.DispatcherServlet | main
2014-08-29 14:23:53,521 | INFO  | jolokia-agent: No access restrictor found
at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api |
main
2014-08-29 14:24:18,497 | TRACE | redelivery #7 of:
ID:A70103-62300-1409311816080-9:1:2:1:1 with delay: 10000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:56155@61616
2014-08-29 14:24:28,140 | TRACE | redelivery #8 of:
ID:A70103-62300-1409311816080-9:1:2:1:1 with delay: 20000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:56155@61616
2014-08-29 14:24:48,204 | TRACE | redelivery #9 of:
ID:A70103-62300-1409311816080-9:1:2:1:1 with delay: 40000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:56155@61616
2014-08-29 14:25:28,105 | TRACE | redelivery #10 of:
ID:A70103-62300-1409311816080-9:1:2:1:1 with delay: 80000, dest:
queue://demo | org.apache.activemq.broker.util.RedeliveryPlugin | ActiveMQ
Transport: tcp:///127.0.0.1:56155@61616




--
View this message in context: http://activemq.2283324.n4.nabble.com/redeliveryPlugin-seems-to-have-problems-with-defaultEntry-tp4685094p4685143.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: redeliveryPlugin seems to have problems with defaultEntry

Posted by preben <pr...@gmail.com>.
Doesn't seem to make any difference.

DefaultEntry is not taken into account, only the direct
redeliveryPolicyEntries seems to work if you set a queue property that
matches a queue.
eg.

<redeliveryPolicyMap>
                        <redeliveryPolicyEntries>
                            <redeliveryPolicy queue="demo"
maximumRedeliveries="10" redeliveryDelay="10000"
useExponentialBackOff="true" backOffMultiplier="2"/>
                        </redeliveryPolicyEntries>
                        <defaultEntry>
                            <redeliveryPolicy maximumRedeliveries="3"
redeliveryDelay="10000" initialRedeliveryDelay="5000"/>
                        </defaultEntry>
                    </redeliveryPolicyMap>

If you have at queue that doesn't fit, and therefore should get the
defaultEntry nothing happens, or better said you get amq default redelivery
of 6.


In my case i get the expected redelivery for queue demo, but for queue foo I
get 6 default redeliveries where I would have expected to get 3

/Preben




--
View this message in context: http://activemq.2283324.n4.nabble.com/redeliveryPlugin-seems-to-have-problems-with-defaultEntry-tp4685094p4685142.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.