activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alberto Aresca (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy
Date Fri, 17 Aug 2012 14:23:38 GMT

    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436754#comment-13436754
] 

Alberto Aresca commented on AMQ-3285:
-------------------------------------

Hello Timothy, I've just run the ast version of the test case you attached but I don't see
any delay between redeliveries:

{code}
2012-08-17 11:16:59,897 [queueListenerPojo-1] WARN  org.springframework.jms.listener.DefaultMessageListenerContainer
 - Execution of JMS message listener failed, and no ErrorHandler has been set.
java.lang.IllegalStateException: an exception
	at test.LoggingMessageListener.onMessage(LoggingMessageListener.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy13.onMessage(Unknown Source)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:243)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
	at java.lang.Thread.run(Thread.java:680)
2012-08-17 11:16:59,902 [queueListenerPojo-1] INFO  test.LoggingMessageListener  - received:
ActiveMQTextMessage {commandId = 10, responseRequired = false, messageId = ID:MacBook-Pro-de-Alberto-Aresca-2.local-65429-1345213018686-2:1:2:1:1,
originalDestination = null, originalTransactionId = null, producerId = ID:MacBook-Pro-de-Alberto-Aresca-2.local-65429-1345213018686-2:1:2:1,
destination = queue://myQueue, transactionId = XID:1114926712:737072696e672d62746d0000013934f1b46700000001:737072696e672d62746d0000013934f1b48b00000004,
expiration = 0, timestamp = 1345213019275, arrival = 0, brokerInTime = 1345213019327, brokerOutTime
= 1345213019901, correlationId = null, replyTo = null, persistent = true, type = null, priority
= 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID
= null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter
= 10, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable
= false, text = text message}
2012-08-17 11:16:59,903 [queueListenerPojo-1] WARN  org.springframework.jms.listener.DefaultMessageListenerContainer
 - Execution of JMS message listener failed, and no ErrorHandler has been set.
java.lang.IllegalStateException: an exception
	at test.LoggingMessageListener.onMessage(LoggingMessageListener.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy13.onMessage(Unknown Source)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:243)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
	at java.lang.Thread.run(Thread.java:680)
{code}

As you can se from the log of my last 2 redeliveries the wait is of about 10 ms while it should
be 10s*2*$(last_redelivery_timeout}

Am I missing something?

                
> ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy
> -------------------------------------------------------------------------------------
>
>                 Key: AMQ-3285
>                 URL: https://issues.apache.org/jira/browse/AMQ-3285
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.4.0, 5.4.2, 5.5.0
>            Reporter: Jaskirat Bhatia
>         Attachments: activemq-test-0.1-project.zip, activemq-test.zip
>
>
> I tried to add these following parameters to my redelivery policy and activeMQ is not
respecting any of them except maximumRedelivery
> <spring:bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
> 			<spring:property name="maximumRedeliveries" value="5"/>
> 			<spring:property name="initialRedeliveryDelay" value="5000"/>
> 						<spring:property name="redeliveryDelay" value="2000"/>
> 			<spring:property name="useExponentialBackOff" value="true"/>
> 			<spring:property name="backOffMultiplier" value="2"/>
> 		</spring:bean>
> I have attached the project which I took from https://issues.apache.org/jira/browse/AMQ-1593
and added the above parameter to my brokerURL:
> tcp://localhost:5000?jms.redeliveryPolicy.maximumRedeliveries=3&jms.redeliveryPolicy.initialRedeliveryDelay=10000&jms.redeliveryPolicy.deliveryDelay=10000&jms.redeliveryPolicy.useExponentialBackOff=true&jms.redeliveryPolicy.backOffMultiplier=2
> This test case will show you that none of the parameters like initiaRedeliveryDelay etc
will take effect, except maxRedeliveries

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message