Slackbot
07/27/2023, 7:04 PMChris Bono
07/27/2023, 8:26 PMChris Bono
07/27/2023, 8:28 PMChris Bono
07/27/2023, 8:31 PMChris Bono
07/27/2023, 8:31 PMChris Bono
07/27/2023, 8:38 PMspring-pulsar/reactive prefix of your question. Can you create the issue in the Spring Pulsar Github repo as I was thinking you were seeing issues in the Pulsar reactive client.Ali Ustek
07/27/2023, 8:52 PMInstant attribute, the error is org.apache.pulsar.client.api.SchemaSerializationException: <http://org.apache.pulsar.shade.com|org.apache.pulsar.shade.com>.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type 'java.time.Instant' not supported by default: add Module "org.apache.pulsar.shade.com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handlingAli Ustek
07/27/2023, 8:54 PMChris Bono
07/27/2023, 8:58 PMJooHyukKim
07/27/2023, 11:45 PMJooHyukKim
07/27/2023, 11:46 PMChris Bono
07/28/2023, 3:39 AMorg.apache.pulsar.shade.com.fasterxml.jackson.datatype:jackson-datatype-jsr310. I think this may be an issue w/ the Pulsar client shading. What version of Spring Pulsar and Pulsar client are you using @Ali Ustek?Chris Bono
07/28/2023, 4:00 AM2.12 and 3.0.x (according to the last PR in the list above.Ali Ustek
07/28/2023, 9:42 AMChris Bono
07/28/2023, 1:07 PM0.2.1-SNAPSHOT is because that version is using Pulsar client 3.0.0 (which has the fix in the Pulsar client (see links above).
I will take a look sometime today though and see what I can see on my end. In these cases, the 1st thing I do is remove Spring Pulsar from the equation and use the client directly and see if the issue is still there. That helps pinpoint where the issue lies. I will comment on the ticket once I take a look.Ali Ustek
07/28/2023, 1:08 PMChris Bono
07/28/2023, 1:26 PMAli Ustek
07/28/2023, 2:45 PMpublic class SensorPublisher {
public static void main(String[] args) throws PulsarClientException {
PulsarClient pulsarClient =
PulsarClient.builder().serviceUrl("<pulsar://localhost:6650>").build();
ReactivePulsarClient reactivePulsarClient = AdaptedReactivePulsarClientFactory.create(pulsarClient);
ReactiveMessageSender<SensorEvent> messageSender = reactivePulsarClient
.messageSender(Schema.JSON(SensorEvent.class))
.topic(SENSOR_INGEST_TOPIC_NAME)
.build();
Mono<MessageId> messageId = messageSender.sendOne(MessageSpec.of(new SensorEvent("sample", 25, Instant.now())));
messageId.subscribe(System.out::println);
}
}
Still getting the exception
15:44:25.559 [pulsar-client-io-1-1] ERROR reactor.core.publisher.Operators - Operator called default onErrorDropped
reactor.core.Exceptions$ErrorCallbackNotImplemented: org.apache.pulsar.client.api.SchemaSerializationException: org.apache.pulsar.shade.com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.Instant` not supported by default: add Module "org.apache.pulsar.shade.com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: com.collibra.events.model.SensorEvent["time"])
Caused by: org.apache.pulsar.client.api.SchemaSerializationException: org.apache.pulsar.shade.com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.Instant` not supported by default: add Module "org.apache.pulsar.shade.com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: com.collibra.events.model.SensorEvent["time"])Chris Bono
07/28/2023, 3:00 PMAli Ustek
07/28/2023, 3:05 PMChris Bono
07/28/2023, 3:06 PMAli Ustek
07/28/2023, 3:06 PMAli Ustek
07/28/2023, 3:06 PMAli Ustek
07/28/2023, 3:07 PMChris Bono
07/28/2023, 3:07 PMChris Bono
07/28/2023, 3:07 PMAli Ustek
07/28/2023, 3:07 PMChris Bono
07/28/2023, 3:07 PMChris Bono
07/28/2023, 3:08 PMAli Ustek
07/28/2023, 3:08 PMChris Bono
07/28/2023, 3:09 PMChris Bono
07/28/2023, 3:12 PM0.2.x is compatible w/ SB 3.0x and maybe compatible w/ SB 3.1.x (see https://docs.spring.io/spring-pulsar/docs/current-SNAPSHOT/reference/html/#appendix.version-compatibility).
I don’t think this is the issue though - just pointing this out.Ali Ustek
07/28/2023, 3:16 PMChris Bono
07/29/2023, 4:27 AMAli Ustek
07/31/2023, 8:21 AMChris Bono
07/31/2023, 1:00 PMChristophe Bornet
08/02/2023, 8:12 PM