Endpoint operation information lost when routing through camel --------------------------------------------------------------
Key: SM-1111 URL: https://issues.apache.org/activemq/browse/SM-1111 Project: ServiceMix Issue Type: Bug Components: servicemix-camel Reporter: Kristian Koehler Attachments: patches.zip Hi I encountered problems regarding message routing to the camel service engine and back to the jbi NMR again. The information about the ("initial") called operation on a endpoint is lost while communicating with camel. see also http://www.nabble.com/Possible-Solution-to-a-camel-serviceengine-problem-or-only-a-bad-workaround---tf4645158s12049.html IMHO there are three different strategies to solve this problem: (thanks Guillaume pointing me to them ;-) ) * (1) DSL - API call within the RouteBuilder It's currently not possible to do this because the JbiEndpoint doesn't have methods to set the operation. Sample: --- 8< --- String toUri = "jbi:endpoint:xxx"; Endpoint endpoint = getContext().getEndpoint(toUri); if (endpoint instanceof JbiEndpoint) { JbiEndpoint jbiEndpoint = (JbiEndpoint) endpoint; //not possible jbiEndpoint.setOperation(operation); } from(fromUri).to(toUri); --- 8< --- * (2) URI - Setting the operation within the endpoint URI. This option specifies the operation within the given endpoint URI. It's clear which operation should be called but you always have to define the operation for a routing. --- 8< --- String toUri = "jbi:endpoint:xxx?operation=process"; from(fromUri).to(toUri); --- 8< --- * (3) Copying the information This option copies the operation information from the "from-"Endpoint to the "to-"Endpoint. This is a simple solution if you want to call the same operation on all endpoints involved. I think option 2 and 3 should be applied. Option 2 overrides option 3. If you specify a direct operation information within your URI this one is used. Kristian ps: option 2 and 3 are available as patches within the attached file -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.