EventStore / EventStoreDB-Client-Java

Official Asynchronous Java 8+ Client Library for EventStoreDB 20.6+
https://eventstore.com
Apache License 2.0
61 stars 19 forks source link

Telemetry injection forces event data content type to JSON #280

Closed andersflemmen closed 1 week ago

andersflemmen commented 2 weeks ago

When upgrading the client from version 5.3.0 to 5.4.0, we ran into problems where the system projections were not picking up any events. After some digging, we noticed our Protobuf events were being interpreted as JSON.

Looks like the problem is caused by this line, which seems to ignore the current format of the event data and just forces it to JSON: https://github.com/EventStore/EventStoreDB-Client-Java/blob/a7158994d0e37d7d7c4dca5b63ff49a17b01c3bd/db-client-java/src/main/java/com/eventstore/dbclient/ClientTelemetry.java#L34

Should this take the current content type into consideration, or am I missing something?

josephcummings commented 2 weeks ago

Hi @andersflemmen

Thanks for raising this, yes it looks like you are correct.

I will look into this further and prepare a patch for this problem and get back to you shortly.

josephcummings commented 2 weeks ago

Hey @andersflemmen

Sorry for the delay, a fix is being prepared now, once merged it will be released as patch v5.4.1 - I will notify you here once that's available, too.

josephcummings commented 1 week ago

Hi @andersflemmen

I can confirm the patch is now available on v5.4.1.

Thanks for bringing this to our attention, let me know if you have any further issues going forwards 👍