My confuguration: I want updatesender bean to send one JMS message to Updates
queue every time the method sendUM() invokes. In a real life it work a bit
different...
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<package>org.apache.camel.example.spring</package>
<route>
<from uri="bean:updatesender?methodName=sendUM"/>
<to uri="activemq:queue:Updates?exchangePattern=InOnly" />
</route>
</camelContext>
<bean id="updatesender" class="JMSSender" />
<camel:template id="camelTemplate"/>
------------------------------
My JMSSender class is very simple:
------------------------------
public class JMSSender
{
ArrayList<Properties> um = null;
public void sendMessage(ArrayList<Properties> u)
{
this.um = u;
sendUM();
}
public ArrayList<Properties> sendUM()
{
return um;
}
}
------------------------------
Problems:
1. My problem is that I invoke method sendMessage only once un my app. So
Method sendUM is called only once as well. But using activeMQ monitor I see
that my message was sent every 20-25 seconds and my listener app receives
this message many times, until I stop my application which sent this only
one message.
2. If I stop my listener app and browse my Updates queue than I see only one
message there (although admin app show many messages there), all other
(duplicated) messages are immediately moved to ActiveMQ.DLQ queue.
SO my questions are: how to avoid this behavior and why message resends
every 20-25 seconds automatically, is that configuration problem?
--
View this message in context:
http://www.nabble.com/Camel-routes-to-JMS-problem%3A-one-simple-message-sent-many-times-%28duplicated%29-tp21704304s22882p21704304.html
Sent from the Camel - Users mailing list archive at Nabble.com.