On Mon, Jul 18, 2011 at 4:05 PM, pvenini <[email protected]> wrote:
> Hi, I finally managed to go forward a few steps by modifying the quickfix
> converter. The route I'm building looks like this:
>
> from("quickfix:config.cfg").
> filter(
>
> header(QuickfixjEndpoint.MESSAGE_TYPE_KEY).isEqualTo(MsgType.ORDER_SINGLE)).
> unmarshal(camelDataFormat).
> to("jetty:http://localhost:8502/trade.php";).
> process(new HttpResponseProcessor()).
> marshal(camelDataFormat).
> to("quickfix:config.cfg");
>
> The idea is that the FIX NewOrderSingle message is parsed by Bindy, an HTTP
> request is generated an sent to the destination server and depending on the
> response, a FIX message is sent back (an ExecutionReport).
> This works OK up to the point of the marshal part, but when it gets to the
> to:quickfix.cfg (the final destination in the route), the inMessage reverts
> to the original NewOrderSingle message, an the Quickfix component throws a
> null pointer exception.
> Question is: is this route correct (I'm using the same endpoint for the
> consumer and the producer) and if not, what should be the correct way to
> send the response back?
>

It depends on the consumer. Some supports a request/response pattern.
For example a web server, where a HTTP client send a request to the
web server, and the web server sends back a response.

The FIX consumer may support that as well, if a client is to do a request/reply.
In those cases you just do

from X
  filter
  to Y
  marshal
  to Z

So the idiom is that when the route "ends" then the consumer gets
control back and can send back the reply message, based on what the
message currently has been set as.



> Thanks
>
> Pablo
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Translate-FIX-message-to-HTTP-request-tp4492401p4599664.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to