This code pattern demonstrates one of the use cases of using Event Endpoint Management in an existing event-driven microservices architecture. This code pattern will guide you how to share a Kafka topic with Event Endpoint Management. In the same way that API Management enables you to make APIs easier to discover, subscribe to, and use, Event Endpoint Management enables you to do the same thing for events.
The previous code pattern, Scaling an Event Driven architecture using an Event Driven autoscaler, walked you through creating a Kafka cluster, creating microservices to interact with it, and deploying an example food ordering application. In this code pattern, you will extend that code pattern to have other developers or event consumers subscribe to the stream of events in a Kafka topic and integrate those events in their own applications.
With Event Endpoint Management, this allows an organization or an entity to share its stream of events in a Kafka topic and manage this. Event Endpoint Management uses the AsyncAPI standard specification to define and document the stream of events. This allows developers to discover and easily integrate the stream of events shared by the organization. The developers can then generate and manage their own credentials to consume the stream. Event Endpoint Management is included in Cloud Pak for Integration.
When you have completed this code pattern, you will understand how to:
- Share a Kafka Topic with Event Endpoint Management
- Subscribe to the Event Endpoint AsyncAPI
- Integrate an application to use the Event Endpoint
The flow steps 1 – 10 in the architecture are the same as in the previous code pattern, Scaling an Event Driven architecture using an Event Driven autoscaler. This will provide us with a Kafka topic containing the events we want to expose.
11 – The event producer entity generates an AsyncAPI definition based on the Kafka topic. They publish this definition to the Event Endpoint Manager portal so that the external app developer can discover it.
12 – The external app developer entity discovers and subscribes to the AsyncAPI, enabling it to create a connection to the Kafka topic through the event endpoint gateway.
13 – The external app developer deploys its finished app that connects the AsyncAPI endpoint.
14 – The system administrator of an example restaurant sets up its own environment for its point of sale system.
15 – The system administrator uses the external app developer’s application to set up its webhook so that it gets notifications for whenever its restaurant gets orders.
16 – The restaurant’s point of sale system gets notifications from the external app developer’s app through webhooks being sent.
Find the detailed steps for this pattern in the readme file. The steps will show you how to:
- Clone the repo.
- Configure Event Endpoint Management.
- Subscribe to Event Endpoint AsyncAPI.
- Create secrets.
- Deploy the microservices.
- Run the application.