Hi,
I am trying to develop an application where I have a jms:message-driven-channel-adapter, which listens to a queue. After receiving the message I pass it through following stages
In case the filter returns true, I create some webservice request and send the webservice request.
Now if the webservice is down, I get org.springframework.ws.client.WebServiceIOExceptio n. What I want to achive in above case is that the transaction should be rolled back and ten message should be redelivered as configured in AMQ'a RedeliveryPolicy.
When I explicitly throw RuntimeException at 1 and 3 mentioned above, I can see that the redelivery policy worked and the message is sent to ActiveMQ.DLQ. However when I get IOException, the redelivery doesn't work. I can only see that in the log the it hasn't tried for preconfigured number of times.
When I looked at the console of AMQ, I found that it shown java.net.SocketException: Connection reset in case I get IOException. I don't understand why the message is displayed on AMQ.
I have configured transaction-manager in message-driven-channel-adapter.
Below are some imp. configs
<jms:message-driven-channel-adapter id="jsmin"
channel="reqChannel"
destination="requestQueue"
concurrent-consumers="1"
transaction-manager="myTxManager"
error-channel="errorChannel"/>
<beans:bean id="myTxManager" class="org.springframework.jms.connection.JmsTrans actionManager">
<beans:property name="connectionFactory" ref="connectionFactory"></beans:property>
</beans:bean>
Please provide inputs on this.
Thanks in advance.
I am trying to develop an application where I have a jms:message-driven-channel-adapter, which listens to a queue. After receiving the message I pass it through following stages
- Transformation of the received message
- Unmarshalling the in-message,
- Filter the unmarshelled message.
In case the filter returns true, I create some webservice request and send the webservice request.
Now if the webservice is down, I get org.springframework.ws.client.WebServiceIOExceptio n. What I want to achive in above case is that the transaction should be rolled back and ten message should be redelivered as configured in AMQ'a RedeliveryPolicy.
When I explicitly throw RuntimeException at 1 and 3 mentioned above, I can see that the redelivery policy worked and the message is sent to ActiveMQ.DLQ. However when I get IOException, the redelivery doesn't work. I can only see that in the log the it hasn't tried for preconfigured number of times.
When I looked at the console of AMQ, I found that it shown java.net.SocketException: Connection reset in case I get IOException. I don't understand why the message is displayed on AMQ.
I have configured transaction-manager in message-driven-channel-adapter.
Below are some imp. configs
<jms:message-driven-channel-adapter id="jsmin"
channel="reqChannel"
destination="requestQueue"
concurrent-consumers="1"
transaction-manager="myTxManager"
error-channel="errorChannel"/>
<beans:bean id="myTxManager" class="org.springframework.jms.connection.JmsTrans actionManager">
<beans:property name="connectionFactory" ref="connectionFactory"></beans:property>
</beans:bean>
Please provide inputs on this.
Thanks in advance.