Default response in Camel route
Environment
- JBoss Fuse 6.1
Issue
- In the following route the response is replaced with the empty body, while I expect "foo" to be returned. Why?
from(...).setBody().constant("foo").to("seda:audit");
Resolution
Please replace .to("seda:audit") with .inOnly("seda:audit"). By default Camel works in inOut mode, so by default the exchange will be replaced by the results returned from the SEDA.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
