> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/technical-guide/integration/integration-examples/kafka.md).

# Kafka

Sample integration with Open Loyalty using Kafka

{% stepper %}
{% step %}
Open Loyalty sends webhooks events to an Integration Service using HTTP protocol. The Integration Service is responsible for accepting the HTTP POST method and the ETL process, and for streaming the event to the Kafka topic. Then, the Consumer Service is responsible for consuming the event and executing business logic.

<figure><img src="https://lh7-qw.googleusercontent.com/slidesz/AGV_vUfUrDi06aJpaXfluPqlt4PYyfpwy3n0x67twbunTfpfqCjbbZ_SGaoP2gi9T3jDLto_HT6wchtMN8yxKPZ4oAPlJ60zaU1e_SNniNP5-Xmwo-hu1c9YbyCUNDEb7kxAuco8iQBE5_WYEuYutPHH0To3A-yur7Y=s2048?key=q4vl9UUexBRVP8pBEsxHUQ" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
The Client sends events directly to the Kafka topic. Then, the Server is responsible for consuming the event and executing business logic. This logic may involve Open Loyalty’s API, like in the case below, but not only. The first step is validating that the Member is registered in Open Loyalty and, if true, it sends the event to Open Loyalty using REST API. Finally, the Server calls the Marketing Automation API to send a push notification to the Client.

<figure><img src="https://lh7-qw.googleusercontent.com/slidesz/AGV_vUewJk5iVgjo5K9l7HGwxRiP7a5pEr9lGTa3hxWm2fEL8_B5dd-ilAsEjM6vIPQ4QkReBhqFF12ts_xlBibMDkcXOFVse5zlh2tXV_VhSEbUPw5vQ0r8mHW_NBQZuoV1WzPhLtVWI7Qs2_3X4npeAeV2BiHffdRH=s2048?key=q4vl9UUexBRVP8pBEsxHUQ" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/technical-guide/integration/integration-examples/kafka.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
