Request-response between two systems using ApacheCamel
I am very new to EIP and ApacheCamel and need help from experts. The question is mainly about the best way to retrieve the data from System B that System A needs using ApacheCamel. For example: System B has a MultiplyService. System A needs to use this service through ApacheCamel. ApacheCamel receives a request from System A, passes it to System B (somehow), waiting for a response, and pass it back to System A. So far, I found an example on the Internet using the MultiplyService in ApacheCamel:
from("jms:queue:numbers").to("multiplier");
Thanks in advance.
source to share
there are many options, in general I would wrap any services that need to be available to other applications with HTTP (jetty), REST (cxfrs), SOAP (cxfws), or JMS (AMQ request / reply) ..
define it in system B ...
from("jetty://localhost:9001/multiplier).process(new MyMultiplierService());
and call it from system A like this ...
from("jms:queue:numbers").to("jetty://localhost:9001/multiplier");
source to share