이 콘텐츠는 선택한 언어로 제공되지 않습니다.
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.MessagePayloadDecoratorin your class path. - Open the file.
- Enter the full name of your implementation class in the file.
Save the file.
The
MessagePayloadDecoratorProviderloads 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.xmlfile 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>
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-quarkus-events-smallrye</artifactId> <version>1.15</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Events decisions add-on for {QAURKUS}
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-events-decisions</artifactId> <version>1.15</version> </dependency>
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-events-decisions</artifactId> <version>1.15</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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>
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-springboot-events-kafka</artifactId> <version>1.15</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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>
<dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-addons-springboot-events-decisions</artifactId> <version>1.15</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow