Just to make it easier to see what I need I created a sample project.
Main part is:
from("direct:" + scenario)
.log("Sending request to: " + requestEndpoint)
.to(requestEndpoint);
from("jms:queue:request-" + scenario)
.log("Received request on: jms:queue:request-" + scenario +
"\n${logExchange}")
.setHeader("corrId").simple("${header.msgId}");
And my question is what can I do to make it work without changing the
second route, and keeping only "to()" in the first route and not
changing it to "to().inOnly() + pollEnrich()".
Link to the project:
https://drive.google.com/file/d/11ljZKEb6FvlHoWj01tOSgF0Sz8eujBXP/view?usp=sharing
Kind regards,
Marcin Wieckowski.