Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we call a custom defined Camel Processor in the Integration Flow? #76

Open
sunil-solace opened this issue Apr 12, 2023 Discussed in #74 · 0 comments
Open

How can we call a custom defined Camel Processor in the Integration Flow? #76

sunil-solace opened this issue Apr 12, 2023 Discussed in #74 · 0 comments

Comments

@sunil-solace
Copy link

Discussed in #74

Originally posted by sunil-solace April 9, 2023
We have a custom Camel based Adapter being developed. It basically invokes the Producer and Consumer implementations we've defined using Receiver and Sender, but we also would like to invoke a custom Processor in our Adapter from the Integration Suite. Is this supported, if yes, then what's the way around it?

Following is the example of what is being done:

The following processor is implemented in the Custom Adapter:

public class MyCustomProcessor implements Processor {
  @Override
  public void process(Exchange exchange) throws Exception {
    //...
  }
}

and this is how it would work in the Camel world:

<bean id="myCustomProcessor" class="com.example.MyCustomAdapter.MyProcessor"/>

  <camelContext>
    <route>
      <from uri="direct:start"/>
      <process ref="myCustomProcessor"/>
      <to uri="mock:result"/>
    </route>
  </camelContext>
</beans>
```</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant