You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Jaskirat Bhatia (JIRA)" <ji...@apache.org> on 2011/04/18 20:26:05 UTC

[jira] [Created] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

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.5.0, 5.4.2, 5.4.0
            Reporter: Jaskirat Bhatia
         Attachments: 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

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

Alberto Aresca updated AMQ-3285:
--------------------------------

    Attachment: activemq-test-0.1-project.zip

Thanks Jas, please find attached the new test case
                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Alberto Aresca (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235310#comment-13235310 ] 

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

Hi all,

I've been experiencing the very same issue Jaskirat has been talking about. I took the liberty to clean up the test he uploaded to expose even better the problem.

Basically now the brokerURL is configured properly (without using CDATA and escaping the & to  %26 )and by debugging it I can se that the org.apache.activemq.RedeliveryPolicy is correctly configured. However some of the property I've set (especially the useExponentialBackOff related one)

Please take a look at the new attached test
                
> 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.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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Alex Ooi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426318#comment-13426318 ] 

Alex Ooi commented on AMQ-3285:
-------------------------------

Hello,

Did this get resolved?!

We are using ActiveMQ 5.5.1 (second latest.. I see that 5.6.0 is available) and am seeing this exact issue. The redeliveryDelay in the latest comment is set correctly, but the message is getting picked up immediately by the Listener...

Thus, our configurations for redelivery are not being respected.

Is there any intention to fix this? We are not using the persistent mechanism of ActiveMQ. Haven't tried with persistence, but this is not ideal for our scenario anyway. We want to keep messages non-persistent, but also want the redelivery to occur when a transaction is rolled back and respect the redelivery configuration so that we dont use up all of our redeliveries in such a short space of time.
                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Jan Lievens (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026882#comment-13026882 ] 

Jan Lievens commented on AMQ-3285:
----------------------------------

The problem lies with the fact that a PoolingConnectionFactory is used. When using the org.springframework.jms.connection.CachingConnectionFactory the various backoff-settings do take effect. This is most likely not fixable due to the fact that multiple ActiveMQMessageConsumers are created and destroyed when using the PoolingConnectionFactory while that is not the case with the CachingConnectionFactory. At least what I see is that the prolific creation and destruction of ActiveMQMessageConsumers in conjunction with the fact that this class is holding state (e.g. the redeliveryDelay property) between rollbacks tends to be contradictory.
Maybe someone with a better understanding of ActiveMQMessageConsumer in relation with PoolingConnectionFactory can shed some light on this. At least there is a workaround.

> 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.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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

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

Jaskirat Bhatia updated AMQ-3285:
---------------------------------

    Attachment: activemq-test.zip

> 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.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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Alberto Aresca (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235313#comment-13235313 ] 

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

Ok I realized I can't attach anything being the case close so I will only post the modification I made:

* Changed the brockerURL properties from the bean queueConnectionFactory to
{code}
<prop key="brokerURL" >tcp://localhost:61616?jms.redeliveryPolicy.maximumRedeliveries=10%26jms.redeliveryPolicy.initialRedeliveryDelay=10000%26jms.redeliveryPolicy.deliveryDelay=10000%26jms.redeliveryPolicy.useExponentialBackOff=true%26jms.redeliveryPolicy.backOffMultiplier=2</prop>
{code}
* Replaced the pom with the following one
{code:xml}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>test</groupId>
	<artifactId>activemq-test</artifactId>
	<packaging>jar</packaging>
	<name>activemq-xaconnection-factory-test</name>
	<version>0.1</version>
	<url></url>

	<properties>
		<slf4j.version>1.6.1</slf4j.version>
		<spring.version>3.0.6.RELEASE</spring.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.apache.geronimo.specs</groupId>
			<artifactId>geronimo-jms_1.1_spec</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.geronimo.specs</groupId>
			<artifactId>geronimo-jta_1.0.1B_spec</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.9</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jms</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-core</artifactId>
			<version>5.5.1</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.btm</groupId>
			<artifactId>btm</artifactId>
			<version>2.1.2</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<fork>true</fork>
					<source>1.6</source>
					<target>1.6</target>
					<meminitial>128m</meminitial>
					<maxmem>512m</maxmem>
					<encoding>UTF-8</encoding>
					<debug>true</debug>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<forkMode>pertest</forkMode>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2.1</version>
				<configuration>
					<descriptorRefs>
						<descriptorRef>project</descriptorRef>
					</descriptorRefs>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>

{code}

Can the case be reopened?

Thanks

                
> 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.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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436757#comment-13436757 ] 

Timothy Bish commented on AMQ-3285:
-----------------------------------

You are welcome to create a JUnit test case that shows your issue and attach it here for review.
                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Alberto Aresca (JIRA)" <ji...@apache.org>.
    [ 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

       

[jira] [Closed] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

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

Timothy Bish closed AMQ-3285.
-----------------------------

    Resolution: Not A Problem

This appears to be an issue of not properly using the correct escape values for the & character in the XML.  If an issue still occurs please provide a JUnit test case the demonstrates as the ActiveMQXAConnectionFactory delegates the property configuration to the same ActiveMQConnectionFactory that is tested quite extensively in the existing unit tests.
                
> 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.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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Jaskirat Bhatia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027106#comment-13027106 ] 

Jaskirat Bhatia commented on AMQ-3285:
--------------------------------------

Hi Jan, nope that is not an issue. This thing works if the produced message is set to persistent, if non-persistent then all other attributes defined in the policy are ignored.

So now the question would be, how to make this thing work for non-persistent messages also?

Thanks

> 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.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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Alberto Aresca (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436828#comment-13436828 ] 

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

Unfortunately I can't attach anything to the case (i guess because the case has been closed), but it can be easily reproduced by simply replacing the jms.redeliveryPolicy.deliveryDelay in the test-context.xml file to jms.redeliveryPolicy.redeliveryDelay.

                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Jaskirat Bhatia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235316#comment-13235316 ] 

Jaskirat Bhatia commented on AMQ-3285:
--------------------------------------

Hi Alberto
leme try to reopen the case. I never followed on this case, but I am sure there is a problem.
                
> 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.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

        

[jira] [Issue Comment Edited] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "John Baker (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256638#comment-13256638 ] 

John Baker edited comment on AMQ-3285 at 4/18/12 3:24 PM:
----------------------------------------------------------

Hello,

I've got some information to add. I've debugged this and find the following code being (correctly?) executed in ActiveMQMessageConsumer when a message is rolled back:

{code}
                    if (redeliveryDelay > 0 && !unconsumedMessages.isClosed()) {
                        // Start up the delivery again a little later.
                        scheduler.executeAfterDelay(new Runnable() {
                            public void run() {
                                try {
                                    if (started.get()) {
                                        start();
                                    }
                                } catch (JMSException e) {
                                    session.connection.onAsyncException(e);
                                }
                            }
                        }, redeliveryDelay);
{code}

The value of redeliveryDelay (in ms) is correct. However, the "problem" is the Spring DefaultMessageListener, which asks ActiveMQ for another message and it gives back the message waiting for redelivery. I can see that the thread has the same ID in the debugger, so I think the problem is better described as:

"ActiveMQ does not remove the message due for redelivery from the queue, but gives it out next time it's asked to do so. After X retries, it's moved to the DLQ and hence the listener will not receive it again when it asks for the next message".

This is a very serious problem.


J
                
      was (Author: jmbaker):
    Hello,

I've got some information to add. I've debugged this and find the following code being (correctly?) executed in ActiveMQMessageConsumer when a message is rolled back:

                    if (redeliveryDelay > 0 && !unconsumedMessages.isClosed()) {
                        // Start up the delivery again a little later.
                        scheduler.executeAfterDelay(new Runnable() {
                            public void run() {
                                try {
                                    if (started.get()) {
                                        start();
                                    }
                                } catch (JMSException e) {
                                    session.connection.onAsyncException(e);
                                }
                            }
                        }, redeliveryDelay);

The value of redeliveryDelay (in ms) is correct. However, the "problem" is the Spring DefaultMessageListener, which asks ActiveMQ for another message and it gives back the message waiting for redelivery. I can see that the thread has the same ID in the debugger, so I think the problem is better described as:

"ActiveMQ does not remove the message due for redelivery from the queue, but gives it out next time it's asked to do so. After X retries, it's moved to the DLQ and hence the listener will not receive it again when it asks for the next message".

This is a very serious problem.


J
                  
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "John Baker (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256638#comment-13256638 ] 

John Baker commented on AMQ-3285:
---------------------------------

Hello,

I've got some information to add. I've debugged this and find the following code being (correctly?) executed in ActiveMQMessageConsumer when a message is rolled back:

                    if (redeliveryDelay > 0 && !unconsumedMessages.isClosed()) {
                        // Start up the delivery again a little later.
                        scheduler.executeAfterDelay(new Runnable() {
                            public void run() {
                                try {
                                    if (started.get()) {
                                        start();
                                    }
                                } catch (JMSException e) {
                                    session.connection.onAsyncException(e);
                                }
                            }
                        }, redeliveryDelay);

The value of redeliveryDelay (in ms) is correct. However, the "problem" is the Spring DefaultMessageListener, which asks ActiveMQ for another message and it gives back the message waiting for redelivery. I can see that the thread has the same ID in the debugger, so I think the problem is better described as:

"ActiveMQ does not remove the message due for redelivery from the queue, but gives it out next time it's asked to do so. After X retries, it's moved to the DLQ and hence the listener will not receive it again when it asks for the next message".

This is a very serious problem.


J
                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022720#comment-13022720 ] 

Gary Tully commented on AMQ-3285:
---------------------------------

not sure what the ![CDATA[ gives you or what the brokerURL string ends up as.

In place of CDATA, try replacing the '&' with the entity '&amp;' so that is validates.

> 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.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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436899#comment-13436899 ] 

Timothy Bish commented on AMQ-3285:
-----------------------------------

Recommend you try and modify the test case  /activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java to show your issue and open a new Jira ticket to track its progress. 
                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426673#comment-13426673 ] 

Timothy Bish commented on AMQ-3285:
-----------------------------------

Added to /activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java to show that there is no issue on client.  The test case has an incorrect option 'deliveryDelay' which should be 'redeliveryDelay'
                
> 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

        

[jira] [Closed] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

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

Timothy Bish closed AMQ-3285.
-----------------------------

    Resolution: Not A Problem

Added to unit test for the /activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java to show options are set as supplied on the URI.
                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Jaskirat Bhatia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022927#comment-13022927 ] 

Jaskirat Bhatia commented on AMQ-3285:
--------------------------------------

Hi Gary
I tried this and still not working:
 <prop key="brokerURL">tcp://localhost:5000?jms.redeliveryPolicy.maximumRedeliveries=3&amp;jms.redeliveryPolicy.initialRedeliveryDelay=10000&amp;jms.redeliveryPolicy.deliveryDelay=10000&amp;jms.redeliveryPolicy.useExponentialBackOff=true&amp;jms.redeliveryPolicy.backOffMultiplier=2</prop>

Thanks
Jaskirat

> 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.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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

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

Jaskirat Bhatia reopened AMQ-3285:
----------------------------------

    Regression: Unit Test Broken

Based on alberto's comment I will reopen this bug
                
> 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.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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Alberto Aresca (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436823#comment-13436823 ] 

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

I've used the same test replacing deliveryDelay with redeliveryDelay but i'm still experiencing the same behavior and I'm under the impression that whatever value I set there won't simply be taken in account by the XA Redelivery policy.

I've attached a new version of the testcase.
                
> 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

        

[jira] [Commented] (AMQ-3285) ActiveMQXAConnectionFactory does not respect various parameters for redelivery policy

Posted by "Jaskirat Bhatia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028892#comment-13028892 ] 

Jaskirat Bhatia commented on AMQ-3285:
--------------------------------------

Something is weird, I was able to run this with persistent message before. But now it is not working anymore.
Can someone help?

> 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.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.
For more information on JIRA, see: http://www.atlassian.com/software/jira