This is an automated email from the ASF dual-hosted git repository.
egonzalez pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 28caeabd0 [Incubator-kie-issues-2093] Workflow Runtime: Problems when
emitting events inside a @Transactional endpoint (#2134)
28caeabd0 is described below
commit 28caeabd090ba7be41893ce2a784d896e5937d56
Author: Enrique <[email protected]>
AuthorDate: Mon Oct 20 09:18:29 2025 +0200
[Incubator-kie-issues-2093] Workflow Runtime: Problems when emitting events
inside a @Transactional endpoint (#2134)
* [Incubator-kie-issues-2093] Workflow Runtime: Problems when emitting
events inside a @Transactional endpoint
* fix properties
* fix property
---
.../main/java/org/acme/travel/AvroMarshallerProducer.java | 3 +++
.../src/main/resources/application.properties | 3 +++
.../src/main/resources/application.properties | 6 ++----
.../src/main/resources/application.properties | 3 ++-
.../kogito/serverless/examples/AvroMarshallerProducer.java | 12 ++++++------
5 files changed, 16 insertions(+), 11 deletions(-)
diff --git
a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java
b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java
index f1de90cce..aec766866 100644
---
a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java
+++
b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java
@@ -29,6 +29,7 @@ import org.kie.kogito.event.avro.AvroIO;
import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
+import jakarta.inject.Named;
@ApplicationScoped
public class AvroMarshallerProducer {
@@ -41,11 +42,13 @@ public class AvroMarshallerProducer {
}
@Produces
+ @Named("avro_marshaller")
EventMarshaller<byte[]> getAvroMarshaller() {
return new AvroEventMarshaller(avroUtils);
}
@Produces
+ @Named("avro_unmarshaller")
EventUnmarshaller<byte[]> getAvroUnmarshaller() {
return new AvroEventUnmarshaller(avroUtils);
}
diff --git
a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/application.properties
b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/application.properties
index 432c301f5..ad5c5238f 100644
---
a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/application.properties
+++
b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/application.properties
@@ -38,6 +38,9 @@
mp.messaging.outgoing.processedtravellers.value.serializer=org.apache.kafka.comm
#showing up message name to channel mapping functionality
kogito.addon.messaging.outgoing.trigger.no\u0020travel=cancelledtravellers
+kogito.addon.messaging.unmarshaller.travellers=avro_unmarshaller
+kogito.addon.messaging.marshaller.processedtravellers=avro_marshaller
+kogito.addon.messaging.marshaller.cancelledtravellers=avro_marshaller
mp.messaging.outgoing.cancelledtravellers.connector=smallrye-kafka
mp.messaging.outgoing.cancelledtravellers.value.serializer=org.apache.kafka.common.serialization.ByteArraySerializer
diff --git
a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/application.properties
b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/application.properties
index 04bfc9036..f51f82682 100644
---
a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/application.properties
+++
b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/application.properties
@@ -28,13 +28,11 @@ kogito.addon.messaging.incoming.defaultName=travellers
mp.messaging.incoming.travellers.connector=smallrye-kafka
mp.messaging.incoming.travellers.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
-mp.messaging.incoming.travellers.group.id=kogito-kafka-one
-mp.messaging.incoming.travellers.auto.offset.reset=earliest
-
+mp.messaging.incoming.travellers.group.id=process-kafka-quickstart-quarkus
mp.messaging.outgoing.kogito_outgoing_stream.connector=smallrye-kafka
mp.messaging.outgoing.kogito_outgoing_stream.topic=processedtravellers
mp.messaging.outgoing.kogito_outgoing_stream.value.serializer=org.apache.kafka.common.serialization.StringSerializer
-mp.messaging.outgoing.kogito_outgoing_stream.group.id=kogito-kafka-one
+mp.messaging.outgoing.kogito_outgoing_stream.group.id=process-kafka-quickstart-quarkus
kogito.quarkus.events.threads.queueSize=10
diff --git
a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties
b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties
index 46b4dfe66..6143dea85 100644
---
a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties
+++
b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties
@@ -27,12 +27,14 @@
mp.messaging.outgoing.out-wait.value.serializer=org.apache.kafka.common.serializ
mp.messaging.outgoing.out-wait.topic=wait
mp.messaging.outgoing.out-wait.group.id=kogito-sw-callback
mp.messaging.outgoing.out-wait.auto.offset.reset=earliest
+mp.messaging.outgoing.out-wait.merge=true
mp.messaging.incoming.in-resume.connector=smallrye-kafka
mp.messaging.incoming.in-resume.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.incoming.in-resume.topic=resume
mp.messaging.incoming.in-resume.group.id=kogito-sw-callback
mp.messaging.incoming.in-resume.auto.offset.reset=earliest
+mp.messaging.incoming.in-resume.broadcast=true
mp.messaging.outgoing.resume.connector=smallrye-kafka
mp.messaging.outgoing.resume.value.serializer=org.apache.kafka.common.serialization.StringSerializer
@@ -52,7 +54,6 @@
mp.messaging.outgoing.kogito-variables-events.connector=smallrye-kafka
mp.messaging.outgoing.kogito-variables-events.topic=kogito-variables-events
mp.messaging.outgoing.kogito-variables-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
-
mp.messaging.outgoing.kogito-processdefinitions-events.connector=smallrye-kafka
mp.messaging.outgoing.kogito-processdefinitions-events.topic=kogito-processdefinitions-events
mp.messaging.outgoing.kogito-processdefinitions-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
diff --git
a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java
b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java
index 680391905..80d5fac73 100644
---
a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java
+++
b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java
@@ -18,16 +18,17 @@
*/
package org.kogito.serverless.examples;
-import jakarta.annotation.PostConstruct;
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.inject.Produces;
-import jakarta.inject.Named;
import java.io.IOException;
-import org.kie.kogito.addon.quarkus.messaging.common.ChannelFormat;
+
import org.kie.kogito.event.CloudEventUnmarshallerFactory;
import org.kie.kogito.event.avro.AvroCloudEventUnmarshallerFactory;
import org.kie.kogito.event.avro.AvroIO;
+import jakarta.annotation.PostConstruct;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.Produces;
+import jakarta.inject.Named;
+
@ApplicationScoped
public class AvroMarshallerProducer {
@@ -40,7 +41,6 @@ public class AvroMarshallerProducer {
@Produces
@Named("avro")
- @ChannelFormat
public CloudEventUnmarshallerFactory<byte[]>
getAvroCloudEventUnmarshallerFactory() {
return new AvroCloudEventUnmarshallerFactory(avroIO);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]