이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 20. 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 feature.
20.1. Technology preview features 링크 복사링크가 클립보드에 복사되었습니다!
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.
20.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:
| Field | Description |
|---|---|
|
|
Prefixes events for Data Grid cache entries with |
|
| Entry value. |
|
| Entry key, converted to string. |
|
| Generated identifier for the event. |
20.3. Enabling cloud events 링크 복사링크가 클립보드에 복사되었습니다!
Configure Data Grid to send CloudEvents.
Prerequisites
- Set up an Kafka cluster that listens for Data Grid topics.
Procedure
Add
spec.cloudEventsto yourInfinispanCR.-
Configure the number of acknowledgements with the
spec.cloudEvents.acksfield. Values are "0", "1", or "all". -
List Kafka servers to which Data Grid sends events with the
spec.cloudEvents.bootstrapServersfield. Specify the Kafka topic for Data Grid events with the
spec.cloudEvents.cacheEntriesTopicfield.spec: cloudEvents: acks: "1" bootstrapServers: my-cluster-kafka-bootstrap_1.<namespace_1>.svc:9092,my-cluster-kafka-bootstrap_2.<namespace_2>.svc:9092 cacheEntriesTopic: target-topicspec: cloudEvents: acks: "1" bootstrapServers: my-cluster-kafka-bootstrap_1.<namespace_1>.svc:9092,my-cluster-kafka-bootstrap_2.<namespace_2>.svc:9092 cacheEntriesTopic: target-topicCopy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Configure the number of acknowledgements with the
- Apply your changes.