Hello,
I have set a Timer componet pointing to a DB, which is triggered at
some interval. I want to send a message to a queue with some value set in
the Header before the processing starts & after its ends .
Like
Message - STARTED
Message - DATA1
Message - DATA2
Message - END
I tried the below approach i don't see any message in the queue
<route customId="false" id="routeMASTER1"
xmlns="http://camel.apache.org/schema/spring">
<from uri="timer://getData?period=2h" />
<process ref="CustomHeaderProcessor" />
<onCompletion mode="BeforeConsumer">
<setHeader headerName="TAG">
<constant>START</constant>
</setHeader>
<to
uri="rabbitmq://Localhost/MSEXCHANGE?autoDelete=false&queue=MS&username=XXXX&password=XXX&routingKey=DAMS"
id="to4" />
</onCompletion>
<onCompletion mode="AfterConsumer">
<setHeader headerName="TAG">
<constant>END</constant>
</setHeader>
<to
uri="rabbitmq://localhost/MSEXCHANGE?autoDelete=false&queue=MS&username=XXXX&password=XXX&routingKey=DAMS"
id="to5" />
</onCompletion>
<setBody id="setBody1">
<constant>select * from TEST</constant>
</setBody>
<to uri="jdbc:DS?outputType=StreamList&statement.maxRows=3"
id="to1" />
..............................
:::::::::::::::::::::::::::::::::::::::::::