Configuration

The OData Business Events Source Connector package includes detailed configuration documentation, which can be found in the following locations:

Additionally, the connector package includes a configuration template file in the etc subfolder:

  • busevent-source-connector.properties

The connector utilizes extensive validators and recommenders and has been tested with the Confluent Control Center UI.

Benefits of Configuring through Confluent Control Center

The OData Business Events Source Connector fully supports configuration through the Confluent Control Center UI. Compared to using property files, configuring through this UI offers several advantages:

  • Suggested property values
  • A comprehensive list of recommended settings
  • Incremental visibility into relevant configuration options
  • A wide range of interactive validations
  • And more

Once the mandatory fields of a service entity have been entered in the configuration UI, a new configuration group for configuring an additional service entity will appear. To maintain optimal performance, the Confluent Control Center UI displays a maximum of 1000 recommendations at a time.

To see how easy it is to set up the OData Business Events Source Connector using the Confluent Control Center, watch this screen recording.

SAP Subscriber Configuration

The subscriber code used in the connectors’ configuration needs to be maintained in the corresponding SAP system configuration. You can either use maintenance view V_SUBSCRBMAINT to e.g. create the subscriber ID KBES or navigate through the SAP menu via transaction SPRO -> Cross-Application Components -> Processes and Tools for Enterprise Applications -> Business Event Handling -> Subscriber -> Create Subscriber ID.

The SAP user must have at least the following authorizations for being able to subscribe to business events:

  • Object BEH_SUBSCR:
    BEH_SUBSCR: KBES
Note

The OData Business Events Source Connector is only able to add subscriptions but not to delete them. If you reduce the number of subscriptions for a connector in the connector configuration, this will not result in deleting subscriptions in the backend, but filtering for the required task codes.

Minimal Configuration Parameters

Service Destination Configuration

A minimal OData V2 service destination configuration looks like this:

# OData V2 server host as either DNS or IP
sap.odata.host.address = services.odata.org
# OData V2 server port
sap.odata.host.port = 443
# OData V2 protocol (supported values are http or https)
sap.odata.host.protocol = https
# OData V2 username for basic authentication.
# For services not requiring authentication this can be set to any value.
sap.odata.user.name = anonymous
# OData V2 user password for basic authentication.
# For services not requiring authentication this can be set to any value.
sap.odata.user.pwd = anonymous
# Unique business event subscriber ID used to subscribe to SAP business events.
sap.busevent.subscriber.code = KBES

Encrypted communication is supported by using HTTPS.
The supported authentication types are basic authentication with a username and password and OAuth client credentials flow.

Service Entity Set Configuration

A minimal service entity set configuration looks like this:

# Business event object type
sap.busevent#00.object.type = SalesOrder
# Business event object task codes
sap.busevent#00.object.task-code = Deleted,Created,Changed
# Kafka topic name
sap.busevent#00.topic = Order_Details
  • The combination of the object.type and object.task-code properties uniquely identifies the business events to be consumed.
  • topic defines the Kafka output topic the connector producer will use to publish extracted data.

Modern web browsers allow for direct use and querying of OData services. This feature can be used, e.g. to test the service or to identify the properties and values required for the connectors’ configuration.

Configuration Support with our CLI Tool

The kafka-connect-odatabusevent connector’s package includes a command line interface (CLI) to help with various tasks such as:

  • Validating connector properties
  • Testing SAP® connections
  • Listing available business event object types
  • Listing and deleting active subscriptions from the SAP source system

Since the CLI is written in Scala you can execute it in Scala or Java.

Prerequisites

To run the CLI you need to provide the following dependencies in the CLASSPATH:

  1. Scala runtime libraries
  2. kafka-clients
  3. kafka-connect-odatabusevent connector libraries

Since a Java runtime is provided by the Confluent Platform and the Scala runtime libraries are part of the connector package, executing the CLI with Java would not require installing Scala.

Java
java -cp <kafka-connect-odatabusevent>:<kafka-clients>:\
<kafka-avro-serializer> \
org.init.ohja.kafka.connect.odata.busevent.source.ODataBusinessEventApp \
<command> <options>
Scala
scala -cp <kafka-connect-odatabusevent>:<kafka-clients>:\
<kafka-avro-serializer> \
org.init.ohja.kafka.connect.odata.busevent.source.ODataBusinessEventApp \
<command> <options>

The required Kafka libraries are usually located in:

  • /usr/share/java/kafka/
  • /usr/share/java/kafka-serde-tools/

Available Commands

  • ping: Test the SAP® connection.
  • object-codes
  • active-subscriptions
  • delete-subscription
  • extract-schema: Print the avro schema of an OData Business Events Source. Extracting Avro schemas requires the presence of io.confluent.kafka-connect-avro-converter in the classpath.
usage:
  ODataBusinessEventApp <command> <options>

commands:
  ping
  object-codes
  active-subscriptions
  delete-subscription -c <subscriber code> -o <object type> -t <object task>
  extract-schema -s <relative service path> -e <entity-set>

mandatory options:
  -p <path to connector properties file>
Note

Avro schemas may differ if the Single Message Transform(s) in the connector configuration are used.