activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BlueFox <>
Subject How to config spring and activeMQ properly?
Date Mon, 17 Sep 2007 17:40:07 GMT

For my application, I need the message to be redelivered infinite times
(exceptions etc) until the session is committed. My problem is the message
will redeliver for a few times (3 ~ 6 times) and no more message will be
processed for some reason. I find out there's MaximumRedeliveries in
Redelivery properties but I have no idea how to set it in spring's xml
config file.

Here's my current setting
<beans xmlns=""

	<!-- create an embedded ActiveMQ Broker -->
	<amq:broker useJmx="false" persistent="false">
			<amq:transportConnector uri="tcp://localhost:0" />

	<!-- ActiveMQ destinations to use  -->
	<amq:queue id="destination"
		physicalName="com.Simulation" />

	<!-- JMS ConnectionFactory to use, configuring the embedded broker using
XML -->
	<amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost" />

	<!-- wrap in a pool to avoid creating a connection per send -->
	<bean id="connectionFactory"
		<property name="targetConnectionFactory" ref="jmsFactory" />

	<!-- Spring JMS Template -->
	<bean id="jmsTemplate"
		<property name="connectionFactory" ref="connectionFactory" />
	<!-- and this is the message consumer container -->
	<bean id="consumerContainer"
		<property name="concurrentConsumers" value="1" />		
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="destination" ref="destination" />
		<property name="messageListener"
			ref="upstreamMetricLoggingService" />
		<property name="sessionTransacted" value="true" />

Please advice.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message