camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikagra <nika...@gmail.com>
Subject Synchronous InOnly with new message
Date Fri, 10 May 2013 10:34:50 GMT
Hello

I'm looking for a way to implement synchronous InOnly with new message body
(wich is empty in my case)

My route makes some processing of some task and I want in some moments
update status of this processing. Number of statuses is quite large. So I've
decided to make updating synchronous to get rid of possible problems. Body
of the message could be also quite big (greater then 1 mb of xml). Since
message body is not used for updating status I'd like to set it to null to
not to overload activemq

First attempt:
    // Task processing route
    .setHeader(CamelConstants.TASK_STATUS, constant("NEW"))
    .inOnly("direct:updateStatus")

    // Status updating route
    from("direct:updateStatus").routeId("direct:updateStatus")
    .setBody(constant(null))
    .inOnly("activemq:queue:updateStatus");

Problem is that this changes initial exchange message

Next attempt is to use WireTap. Problem is that it is asynchronous. Also
wireTap could not be last expression in route (i.e. to set status "DONE")

I think I'm missing something. What are other options?



--
View this message in context: http://camel.465427.n5.nabble.com/Synchronous-InOnly-with-new-message-tp5732258.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message