Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 6. Red Hat build of Kogito events add-on

download PDF

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

  1. Create a file named META-INF/services/org.kie.kogito.add-on.cloudevents.message.MessagePayloadDecorator in your class path.
  2. Open the file.
  3. Enter the full name of your implementation class in the file.
  4. 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 the MessagePayloadDecoratorProvider#decorate, your implementation is part of the decoration algorithm.

  5. 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>

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.