Skip to Content
Technical Articles

Apache Camel Community adapters usage in SAP Cloud Platform Integration

SAP Cloud Platform Integration uses Apache Camel which is an open source framework provides  message-oriented middleware with a rule-based routing and mediation engine. Apache Camel community provides larger no of standard apache camel components which provides uniform endpoint interfaces, to which Camel can send messages or receive messages from them. Basically, these Apache camel components acts as connector to any 3rd party systems, implementing enterprise integration patterns (EIP).

This blog talks about how to use Apache camel community standard components as SAP Cloud Platform Integration (sender/receiver) adapters with a sample CPI integration flow to demonstrate usage of it.

We provide some of the standard Apache Camel Community components as SAP Cloud Platform Integration ADK compliant adapters (ESA) files.  These ESA files can be deployed into Cloud Integration runtime using Eclipse tooling Deploy Artefacts wizard.

For example, a sample ADK compliant adapter file for RabbitMQ Apache Camel Component

We are also providing sample Integration flow, which demonstrate the usage of the Apache Camel community Adapter.  Just import the Integration flow artefact, provide the server configuration by referring to example provided in the adapter property sheet.

Please note that adapter ESA file should be deployed before importing the integration flow artefact.

Deploy the integration flow and check that the integration flow message processing successfully completed in the CPI monitoring

 

In this integration flow, whatever payload we have configured in the Message payload will be persisted to RabbitMQ queue.  An example configuration used here as follows:

 

Sample input provided in the message payload content modifier:

 

Output you can see In the RabbitMQ Queue as you see below:

 

We are also providing the transformed project source code of Apache camel community standard components, which had Cloud integration ADK specific metadata pre-generated.

 

These source you can modify as per your requirements by importing the project in to Eclipse IDE using Maven project import wizard and do your changes as required, build the final project using Maven build , which will generate the ESA file which is the Cloud integration ADK compliant adapter.

You can find the all above mentioned artefacts in the SAP GitHub apibusinesshub-integration-recipes, whose link is provided below

https://github.com/sap/apibusinesshub-integration-recipes/tree/master/Recipes/for/rabbitmq-integration-adapter

Also going forward, we continue to provide more samples of Apache Camel components (https://github.com/apache/camel/tree/master/components  ) as Cloud integration ADK

Compliant adapters. Here all the components we provide based on Apache Camel version 2.17.4.

Disclaimer: This adapter is shipped as “community contribution” under Apache 2.0 license; support for this adapter should be requested by raising an issue in the GitHub repo and not standard SAP channels.

2 Comments
You must be Logged on to comment or reply to a post.
  • Hello Mayur,

    Great news and a reasonable move! I have a few questions!

    -I had the knowledge that SAP didn’t support custom CPI sender adapters in the past. Did that change?

    RabbitMQ adapters sender/consumer will stay connected when the flow’s status is deployed. There are adapters that connect, fetch data, and close the connection e.g. AWS S3 adapter. These polling adapters can benefit from a scheduler.

    -How do you(also we since it is a community repo) plan to add this feature?
    -If the CPI tenant has several runtime nodes how can we synchronize the scheduler? Is there an SAP supported standard way?
    -Can we add the beautiful scheduler tab to the sender adapter configuration page?

    If we implement these polling types of adapters as receiver/producer we can’t start a new process for each file/item. We need another step to split them.

    -Basically, can we recreate standard SFTP sender adapter behavior for other protocols?

    Best regards,
    Fatih

    • Thanks Fatih for the comments.

      we have provided the source code of Apache Camel RabbitMQ component. which you can change and implement timer task , where you can do connect, fetch and close as desired.

      you can also change the ADK UI metadata file to include custom attributed to support timer task configuration. which you can later read in consumer/producer side of the adapter logic.

      RabbitMQ underneath uses AMQP protocol which is based on Events and pub/sub pattern which is completely different from  SFTP behavior. so we cant replicate the same.

      Best Regards,

      Mayur