Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

redeliveryPolicy not working for ActiveMQ 5.3.2

ActiveMQ persistence store option
(18 lines)
Please Help
(52 lines)
Jul 16, 2010
Jin Voon
Jin Voon
Hi,

I have set up redelivery policy in Spring for ActiveMQ but it seems like
it
doesn't work when I tested it.  The rolledback transaction still caused
the
message to be redelivered using the default settings e.g.
initialRedeliveryDelay=1000 and so on.  Does this actually ever worked or
is
there something wrong with my setup?

<bean id="xaConnectionFactory"
class="org.apache.activemq.ActiveMQXAConnectionFactory">
	<property name="brokerURL" value="tcp://localhost:61616"/>
	<property name="userName" value=""/>
	<property name="password" value=""/>
	<property name="redeliveryPolicy" ref="redeliveryPolicy" />
</bean>
	
<bean id="redeliveryPolicy"
class="org.apache.activemq.RedeliveryPolicy">
	<property name="maximumRedeliveries" value="6"/>
	<property name="initialRedeliveryDelay" value="5000"/>
	<property name="useCollisionAvoidance" value="true"/>
	<property name="useExponentialBackOff" value="true"/>
	<property name="backOffMultiplier" value="2"/>
</bean>

Thanks.




Reply
Tags: settingsdefault
Similar Threads
ActiveMQ-CPP Durable Subscriber Not Working.
I have searched through all posts related to the subject. Yet I failed to
find any help. 
Here is the consumer code, and its not able to receive messages as a
durable
subscriber. (It does receive messages  when its connected to the Broker
but
not the onces that are sent when its not connected). 
I have seen people ask this exact question few times in the forum but NONE
of them received any response regarding ActiveMQ-CPP durable subscriber
not
working. Anyone would like to be the first  ?

many thanks



    auto_ptr<cms::ConnectionFactory> connectionFactory(
	  cms::ConnectionFactory::createCMSConnectionFactory( brokerURI ) );
    
    // Create a Connection
    connection = connectionFactory->createConnection();
    connection->start();

    // Create a Session
    session = connection->createSession(
cms::Session::AUTO_ACKNOWLEDGE);

      cms::Topic* topic = session->createTopic("test.foo");
      
      // Create a MessageConsumer from the Session to the Topic or Queue
      cms::MessageConsumer *consumer =
session->createDurableConsumer(topic,"mytest","",false);

	cms::Message* cmsmsg = consumer->receive();

//////////////







Created: (AMQ-2847) build failure for activemq-camel and activemq-optional
build failure for activemq-camel and activemq-optional 

Build failed in Hudson: ActiveMQ-Trunk-Deploy » ActiveMQ :: Core #74
See
<http://hudson.zones.apache.org/hudson...re/74/changes>

Changes:

[rajdavies] Transactions dispatch and commit to the store asynchronously,
though the commit only returns to the producer when they both complete for
KahaDB

[gtully] resolve https://issues.apache.org/activemq/browse/AMQ-2765 -
rework fix for https://issues.apache.org/activemq/browse/AMQ-2772 - each
consumer needs to indicate when interuption processing is complete. till
there is a need to do other wise, the connection consumers (used by the RA
managed connection) immediatly allow redelivery

[dejanb] https://issues.apache.org/activemq/browse/AMQ-2770 - durable
subscription mbean


Re: ActiveMQ not detecting disconnect and notifying ActiveMQ.Advisory.Connection - help?
Hi,

Are you using a network of brokers or a single instance ? I have an open
question regarding this issue too where i saw that connect's do not get
forwarded in a network of brokers while disconnects are... ( i am using
OpenWire though but this might relate to the same issue ..)


sheer-panic wrote:
 
 I need some way to detect when a STOMP client has disconnected
*without*
 sending the disconnect command. I looked into
 ActiveMQ.Advisory.Connection, and this only notifies of disconnects
when
 the STOMP client actually sends the 'DISCONNECT' command, not when
the
 client disconnects via a TCP shutdown.
 
 I'm currently running ActiveMQ 4.1.1, but if there's another version
that
 supports this functionality, I'd be happy to move to it. I'm also
okay
 with the idea of modifying ActiveMQ to do what I want - I've already
 modified it to remove some STOMP headers I didn't want, and done a
fair
 amount of poking around in org.apache.activemq.advisory - if someone
could
 gesture me to where I might start in hacking in hangup detection, I'd
be
 very appriciative..