1
votes

My requirement is to have a web service which will receive the request from clients and then route through camel,enrich it and forward it to another webservice at other clients place ,get response and send it back to the original requestor.

from(webserviceURI)
  .inOut().to("jms:queue:INQueue?replyTo=OUTQueue?replyToType=Exclusive");

from(jms:queue:INQueue).to("http:X").to(jms:OUTQueue)

I am understanding correct.Do we need to set ReplyTo header if we do this. I guess this solves the problem .Earlier in a post Claus (The Camel God :P) had explained there is no need to set correlation id as camel does it automatically if it isnt assigned.Refer Here

My questions are we are looking ultra light weight implementation.we might have to contend with memory as low as 300 MB.No activeMQ,no SMX.Just going with karaf.what is the best jms provider if we need to use jms that has small footprint.or is activemq ok.

I also thinking of doing this

<from uri="cxf:bean:cxfProxyEndpoint?dataFormat=MESSAGE" />
<camel:convertBodyTo type="java.lang.String"></camel:convertBodyTo>
<!-- lot of pre processors  here-->
<to uri="http://X:8080/X">
<!-- lot of post processors-->

The cxf proxy webservice has operations that returns a value.So we receive the request ,send it to preprocessors and then call remote webservice as http endpoint ,get the response ,post process it and the response is message at end of route(am i correct).My question would the request and response match.How should i test it.we also will be multicasting the request from proxy to various http endpoints and aggregating the replies before sending it out to client requestor.Should i really proceed in this route or is it a poor design.

1

1 Answers

3
votes

Yes the latter example would match. Each web-service request will be routed separately and the response from the external http server will automatic match up. In your use-case you most likely do not need JMS.

The JMS makes sense if you have an external system and you need to integrate with that using JMS messaging. Otherwise if not, I suggest to look for a solution without it.