Menu Close
Settings Close

Language and Page Formatting Options

Chapter 16. Sending cloud events from Data Grid clusters

Configure Data Grid as a Knative source by sending CloudEvents to Apache Kafka topics.

Sending cloud events with Red Hat OpenShift Serverless is available as a technology preview.

16.1. Technology Previews

Technology Preview features or capabilities are not supported with Red Hat production service-level agreements (SLAs) and might not be functionally complete.

Red Hat does not recommend using Technology Preview features or capabilities for production. These features provide early access to upcoming product features, which enables you to test functionality and provide feedback during the development process.

For more information, see Red Hat Technology Preview Features Support Scope.

16.2. Cloud events

You can send CloudEvents from Data Grid clusters when entries in caches are created, updated, removed, or expired.

Data Grid sends structured events to Kafka in JSON format, as in the following example:

    "specversion": "1.0",
    "source": "/infinispan/<cluster_name>/<cache_name>",
    "type": "org.infinispan.entry.created",
    "time": "<timestamp>",
    "subject": "<key-name>",
    "id": "key-name:CommandInvocation:node-name:0",
    "data": {
       "property": "value"


Prefixes events for Data Grid cache entries with org.infinispan.entry.


Entry value.


Entry key, converted to string.


Generated identifier for the event.

16.3. Enabling cloud events

Configure Data Grid to send CloudEvents.


  • Set up an Kafka cluster that listens for Data Grid topics.


  1. Add spec.cloudEvents to your Infinispan CR.

    1. Configure the number of acknowledgements with the spec.cloudEvents.acks field. Values are "0", "1", or "all".
    2. List Kafka servers to which Data Grid sends events with the spec.cloudEvents.bootstrapServers field.
    3. Specify the Kafka topic for Data Grid events with the spec.cloudEvents.cacheEntriesTopic field.

          acks: "1"
          bootstrapServers: my-cluster-kafka-bootstrap_1.<namespace_1>.svc:9092,my-cluster-kafka-bootstrap_2.<namespace_2>.svc:9092
          cacheEntriesTopic: target-topic
  2. Apply your changes.