Share event-based APIs with Event Endpoint Management


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.

This code pattern works with Event Streams which is part of IBM Cloud Pak for Integration, but it also works with the Confluent Platform for IBM 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

This code pattern has been tested on Red Hat OpenShift on IBM Cloud and AWS.


Sharing event-based APIs with Event Endpoint Management

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:

  1. Clone the repo.
  2. Configure Event Endpoint Management.
  3. Subscribe to Event Endpoint AsyncAPI.
  4. Create secrets.
  5. Deploy the microservices.
  6. Run the application.