SAP-samples/event-hub-cap-samples
A CAP consumer wired to SAP Cloud Application Event Hub, which has to be deployed to SAP BTP before events arrive, exposing the received events through an OData V4 service.
Connecting a CAP application to SAP Cloud Application Event Hub only works once it is deployed, since the Event Hub cannot reach a project running locally, and this sample is configured for exactly that path: build, deploy to SAP BTP with cf login --sso and npm run deploy, and the events arrive. Once deployed, received events are exposed through an OData V4 service at /odata/v4/cloud-event/Events. It stops at consumption: there is no publishing side, and the README points to a companion SAP PRESS book for the wider event-driven-integration picture rather than restating it.
Facts
Where it sits
Who is behind it
In the atlas: maintains 222@SAP-samplesmaintainerAntonio MaradiagaContributes to this
Developer Advocate
In the atlas: contributes to 10@ajmaradiaga1 contributor
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
As a sample
- Form
- A reference application
Connections
Emitting and consuming business events across systems through brokers
Download
Architecture
as mta.yaml states it at b7e2456, readDownload
.well-known endpoint and then its JWKS.Bound, and not drawn
- ssffcecons-srvSAP Application Logging service for SAP BTP, SAP Destination service, SAP Cloud Application Event Hub
- ssffcecons-app-contentSAP HTML5 Application Repository service for SAP BTP
- ssffcecons-destination-contentSAP Destination service, SAP HTML5 Application Repository service for SAP BTP, SAP Authorization and Trust Management service
Documented, with no instance in the document
- @sap-cloud-sdk/connectivity requires SAP Connectivity servicessffcecons-srv
README
quoted from SAP-samples/event-hub-cap-samples under Apache-2.0, readCloud Event Consumer
This is a sample CAP application configure to easily connect to SAP Cloud Application Event Hub for SAP cloud applications.
Unfortunately, it is not possible to connect SAP Cloud Application Event Hub to a project running locally. The project will need to be deployed to SAP BTP in order to connect to SAP Cloud Application Event Hub.
Next Steps
Open a new terminal and run the following commands
# Login to CloudFoundry
$ cf login --sso
# Build and deploy to BTP
$ npm run build
$ npm run deploy
# To clean up resources
$ npm run undeploy
To access the OData services, navigate to https://.cfapps..hana.ondemand.com/odata/v4/cloud-event/Events
Learn More
Learn more at https://www.sap-press.com/developing-event-driven-integrations-with-sap-btp_6021/.
How to obtain support
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
Contributing
If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.
License
Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap-samples-event-hub-cap-samples- JSON
- /artifacts/sap-samples-event-hub-cap-samples.json
- MCP
- Connecting an agent