You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by fj...@apache.org on 2024/08/21 15:06:54 UTC
(incubator-kie-kogito-examples) branch main updated: Do not serialize as timestamp (#2000)
This is an automated email from the ASF dual-hosted git repository.
fjtiradosarti 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 a1d6e4bf1 Do not serialize as timestamp (#2000)
a1d6e4bf1 is described below
commit a1d6e4bf1e020898f30763a53b3fe6d0a84434ad
Author: Francisco Javier Tirado Sarti <65...@users.noreply.github.com>
AuthorDate: Wed Aug 21 17:06:50 2024 +0200
Do not serialize as timestamp (#2000)
---
kogito-quarkus-examples/process-performance-client/pom.xml | 4 ++++
.../main/java/org/kie/kogito/performance/client/KafkaDispatcher.java | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/kogito-quarkus-examples/process-performance-client/pom.xml b/kogito-quarkus-examples/process-performance-client/pom.xml
index 28f21b8d5..45ddd48ed 100755
--- a/kogito-quarkus-examples/process-performance-client/pom.xml
+++ b/kogito-quarkus-examples/process-performance-client/pom.xml
@@ -77,6 +77,10 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-jsr310</artifactId>
+ </dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-events-api</artifactId>
diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.java
index 119cdc3f4..0e12a697a 100644
--- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.java
+++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.java
@@ -31,6 +31,7 @@ import org.kie.kogito.jackson.utils.ObjectMapperFactory;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
public class KafkaDispatcher implements RequestDispatcher {
@@ -46,7 +47,7 @@ public class KafkaDispatcher implements RequestDispatcher {
public KafkaDispatcher(String trigger) {
this.trigger = trigger;
- this.objectMapper = ObjectMapperFactory.get();
+ this.objectMapper = ObjectMapperFactory.get().disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
Map<String, Object> properties = Collections.singletonMap(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,
"localhost:9092");
kafkaProducer = new KafkaProducer<>(properties, new ByteArraySerializer(), new ByteArraySerializer());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org