Java fire and forget cxf web service call to camel application -
i have java web application (quote engine) makes web service call java web application (multicaster) utilises apache camel multicast message multiple endpoints.
we consuming apache cxf webservice defined in camel context of multicaster project. quote engine project not using camel.
<cxf:cxfendpoint id="caster" address="http://localhost:${multicaster.port}/caster" serviceclass="uk.co.glad.caster.core.casterws"/>
for additional info here multicaster route
<camel:route id="casterroute"> <camel:from ref="caster" /> <camel:process ref="initprocessor" /> <camel:multicast parallelprocessing="true" stoponexception="false" streaming="true"> <camel:to uri="direct:webservice1"/> <camel:to uri="direct:webservice2"/> </camel:multicast> </camel:route>
i need call caster cxf endpoint fire , forget. want send message service , continuing processing in quote engine project without waiting reply.
my web service has void return type dont need reply.
i think may able solve using concurency api , future object wondering if there cleaner way this. maybe using camel config, have read "inonly" parameter can't see how can use in config.
thanks
tom
this solved claus mentioned below using wiretap
<cxf:cxfendpoint id="caster" address="http://localhost:${multicaster.port}/caster" serviceclass="uk.co.glad.caster.core.casterws"/> <camel:route id="tap"> <camel:from ref="caster" /> <camel:wiretap uri="direct:casterroute" /> </camel:route> <camel:route id="casterroute"> <camel:from uri="direct:casterroute" /> <camel:process ref="initprocessor" /> <camel:multicast parallelprocessing="true" stoponexception="false" streaming="true"> <camel:to uri="direct:webservice1"/> <camel:to uri="direct:webservice2"/> </camel:multicast> </camel:route>
use wire tap eip http://camel.apache.org/wire-tap can process tapped message independently, , cxf web service can terminate asap.
Comments
Post a Comment