Key Features
Subscription and Business Event Services
The connector makes use of the following OData V2 service endpoints to handle SAP business events:
-
/sap/opu/odata/sap/CA_BEH_SUBSCRIPTION_SRV
This service is used for managing subscriptions for business events. You can get a list of active subscriptions from entity set
SubscriptionRead
.
Transaction code SWETYPV can be used in SAP to see event subscriptions for business events of receiver type BEH. -
/sap/opu/odata/sap/C_BEHQUEUEDATA_CDS
This service is used to retrieve actual business events for an active subscription. You can get a list of available business events object types and task codes using entity set
I_BusObjects
.
Transaction code SWEQADM can be used in SAP to administer, monitor and trace the business event queue.
SAP Business events are generated through BOR events and stored in an event queue. These events are not immediately pushed to a subscriber, but require a poll-based approach through the OData service mentioned earlier. Furthermore, every business event carries a group of shared attributes:
- BusinessEvent: Unique business event identifier (GUID)
- SAPObjectTaskTypeName: object change task code description
- SAPObjectTypeName: object type description
- SAPObjectType: object type name
- BusEventSubscriberCode: subscription identifier, equals configuration property
sap.busevent.subscriber.code
- SAPObjectTaskCode: object change task code name
- BusinessEventSubscriberName: Subscription name
- BusEventPriority: business event priority
- CreationUTCDateTime: business event creation timestamp in format
YYYYMMDDhhmmss
Business events containing the above-mentioned attributes can directly be pushed to the Kafka target topic. In this case only key fields of the affected business object will be provided. In contrast to this, by setting configuration property object.resolve
to 1
, you can provide another OData service and entity set to get more detailed information about the affected business object via lookups.
See SAP API Business Hub for a set of OData business APIs provided by SAP.
A requirement is that the OData service entity used to query detailed business object data contains the same key properties as the corresponding business event object. The resulting business object data will be enriched by following business event data:
- BusinessEvent
- SAPObjectType
- SAPObjectTaskCode
- CreationUTCDateTime
As a lookup of the business event data is done by the connector itself during event extraction, it is not guaranteed that the business data is read at exactly the same point in time as the business event happens. For instance, if multiple events affect the same business object in a short period of time, the resolved data for all these events could be the same and would be equal to the last state of the business object.
See Business Event Handling APIs for more details.
Delivery Semantics
Business events issued by SAP include a unique identifier (GUID). By utilizing the message offset semantics provided by Kafka Connect, the connector implements offset recovery and exactly-one delivery semantics in the sense of Kafka Connect.
Parallelism
To define the parallelism of the source connector, each business event object type is assigned to exactly one worker task. This restriction is due to the Connect API, which handles REST calls and data loads package-wise in multiple tasks. However, when the poll()
method is called to retrieve new data from the source, the tasks have already been created, and rebalancing is necessary to change task assignments.
If the number of configured object types exceeds the maxTasks
configuration or the available tasks, a single task will handle extractions for business event object types.
- Scaling by adding tasks therefore only makes sense if the amount of configured object types is greater than the amount of available tasks.
- Scaling by adding topic partitions makes no sense at all, as the connector only uses one partition to guarantee sequential order.
Advanced OData Querying
Field Projection
Each OData V2 service entity set defines a set of properties that can be read. An entity distinguishes between key and non-key properties. If the configuration property object.resolve
is set to 1
, the configuration of a connector allows to define a subset of non-key properties that will be extracted to Kafka. Despite this configuration the source connector will always extract all the business event object key properties, together with information about the corresponding business event.
Plugin Discovery
Plugin Discovery is the strategy the Connect worker uses to find plugin classes and make them available for configuration and execution. This process is controlled by the worker’s plugin.discovery
setting.
By default, the plugin.discovery
setting is HYBRID_WARN
, which is compatible with all plugins and logs a warning if it encounters any plugins incompatible with the SERVICE_LOAD
mode. The SERVICE_LOAD
option, which uses the faster ServiceLoader
mechanism, may improve performance during worker startup, but will not load incompatible plugins. See Connect Worker Configuration for all plugin.discovery
values.
The OData Business Events Source Connector supports the ServiceLoader
mechanism.
For more information about Plugin Discovery and the Connect worker configuration refer to Kafka Connect Plugin Discovery as well as KIP-898: Modernize Connect plugin discovery.