my camel route is given below
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" >
<route>
<from uri="bean:SendClass?method=send" />
<to uri="jms:MyQueue" pattern="InOnly" />
</route>
<route>
<from uri="jms:MyQueue" />
<to uri="bean:recvClass?method=recv" />
</route>
</camelContext>
The send method sends messages when activated by a 3rd party Pojo at some irregular intervals.But, the problem i think is camel is restarting the routes once the message is being received by recv bean and resending the same message (hundred's of them in a second ) .Ideally i want it to send the message when the send method gets activated and a new message has been created (i.e JMS Queue should be having unique message's).how do i do this ?
possible solutions being:
- is their some attribute which i can place inside the
<from.../>
to do this ? - write a processor to filter unique message's between the send bean and the queue .
- Is their some other way of routing it without using the
<from uri="bean:..." />
thanks sanre6