이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 6. Red Hat build of Kogito events add-on
The events add-on provides a default implementation in supported target platforms for EventEmitter
and EventReceiver
interfaces. You can use EventEmitter
and EventReceiver
interfaces to enable messaging by process, serverless workflow events, and event decision handling.
6.1. Implementing message payload decorator for Red Hat build of Kogito events add-on
Any dependent add-on can implement the MessagePayloadDecorator.
Prerequisites
- You have installed the Events add-on in Red Hat build of Kogito.
Procedure
-
Create a file named
META-INF/services/org.kie.kogito.add-on.cloudevents.message.MessagePayloadDecorator
in your class path. - Open the file.
- Enter the full name of your implementation class in the file.
Save the file.
The
MessagePayloadDecoratorProvider
loads the file upon application start-up and adds the file to the decoration chain. When Red Hat build of Kogito calls theMessagePayloadDecoratorProvider#decorate
, your implementation is part of the decoration algorithm.To use the events add-on, add the following code to the
pom.xml
file of your project:Events smallrye add-on for {QAURKUS}
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-quarkus-events-smallrye</artifactId> <version>1.15</version> </dependency>
Events decisions add-on for {QAURKUS}
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-events-decisions</artifactId> <version>1.15</version> </dependency>
Events Kafka add-on for Spring Boot
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-springboot-events-kafka</artifactId> <version>1.15</version> </dependency>
Events decisions add-on for Spring Boot
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-springboot-events-decisions</artifactId> <version>1.15</version> </dependency>