Skip to content

Commit

Permalink
Do not serialize as timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Aug 19, 2024
1 parent 9253d3b commit 425074a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions kogito-quarkus-examples/process-performance-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

public class KafkaDispatcher implements RequestDispatcher {

Expand All @@ -46,7 +47,7 @@ public ObjectCloudEvent(String trigger, Object data) {

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());
Expand Down

0 comments on commit 425074a

Please sign in to comment.