which versions of things are you using?
On 11/29/06, MartyH <[EMAIL PROTECTED]> wrote:
Hi folks.
I'm working with activemq as an internal queue in a webapp to process these
things called activities.
I have a number of things I want to acheive.
when a message is delivered and a runtimeexception thrown from it on
processing it, I want it to stay on the queue and be redelivered.
when a message is delivered and being processed, should the queue go down
for any reason, it will be processed on startup again.
Basically my configuration looks like this:
<bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory"
destroy-method="stop">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"><value>${jms.url}</value></property>
</bean>
</property>
</bean>
<bean id="deliveryModePersistent"
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
<property
name="staticField"><value>javax.jms.DeliveryMode.PERSISTENT</value></property>
</bean>
<!-- Spring JMS Template wired to connection pool -->
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory"><ref local="jmsFactory"/></property>
<property name="defaultDestinationName" value="${jms.queue}"/>
<property name="deliveryMode"><ref
bean="deliveryModePersistent"/></property>
</bean>
<!-- Jencks configuration to wire the activity handler to the queue -->
<bean id="jencks" class="org.jencks.JCAContainer">
<property name="bootstrapContext">
<bean class="org.jencks.factory.BootstrapContextFactoryBean">
<property name="threadPoolSize" value="25"/>
</bean>
</property>
<property name="resourceAdapter">
<bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter">
<property name="serverUrl" value="${jms.url}"/>
<property name="maximumRedeliveries" value="10"/>
</bean>
</property>
</bean>
<!-- Inbound message connector wired to the message listener -->
<bean id="inboundConnectorA" class="org.jencks.JCAConnector">
<property name="jcaContainer" ref="jencks" />
<property name="activationSpec">
<bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
<property name="destination" value="${jms.queue}"/>
<property name="destinationType" value="javax.jms.Queue"/>
</bean>
</property>
<property name="ref" value="activityHandler"/>
</bean>
what i'm seeing when a message throws an exception and fails to get
processed its not getting redelivered on broker restart:
journal.JournalPersistenceAdapter 455 ) Journal Recovery Started from:
Active Journal: using 2 x 20.0 Megs at:
C:\Workspace\Projects\sppj\activemq-data\localhost\journal
(journal.JournalPersistenceAdapter 559 ) Journal Recovered: 2 message(s)
in transactions recovered.
(broker.BrokerService 372 ) ActiveMQ JMS Message Broker
(localhost, ID:BL-MHEND-XP-4004-1164812192568-1:0) started
(vm.VMTransportFactory 146 ) binding to broker: localhost
(broker.TransportConnector 208 ) Connector vm://localhost Started
bit lost as to why this is happening... i'd have expected those 2 messages
to get redelivered? no?
hope you can help.
Marty
--
View this message in context:
http://www.nabble.com/redelivery-confusion-tf2725886.html#a7601614
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
James
-------
http://radio.weblogs.com/0112098/