Closed acisternino closed 1 month ago
@acisternino, could you provide a minimal application where we can reproduce the issue? Thanks!
Yes, but I might need a couple of days.
Sorry for the delay, will be addressing it this week
I am closing it as it is duplicate to https://github.com/spring-cloud/spring-cloud-stream/issues/2980
I am sorry but this has nothing to do with spring-cloud/spring-cloud-stream#2980.
This one is about a change in default serialization format for many time-related classes from one version to the next.
No Jackson annotations are involved.
This should be reopened
Could you provide a sample or better explain what exactly you are looking for? You use the same sample, hence my assumption that they are the same, but i may be wrong
Yes you are right, the sample project is used for both issues but each one can be triggered by using a different endpoint.
ATM I have very limited internet access. IIRC everything is explained in the project's readme
Let me read it again
I see the issue, will transfer it to spring-cloud-function
The following happens when working with a RabbitMQ message broker.
Investigating an exception thrown from within the deep bowels of Spring Cloud Stream I have come across a weird change between 4.1.2 and 4.1.3.
The JSON serialization format of any Date/Time related class has changed from a ISO 8601-like String to a unix timestamp.
The following examples are for an hypothetical
ts
property of different Java types and the values are directly copied from the message received in the queue.Examples for 4.1.2 (in 2023.0.2):
j.u.Date
:"ts": "2024-07-29T09:21:40.206+00:00"
j.t.Instant
:"ts": "2024-07-29T09:20:15.002750Z"
j.t.ZonedDateTime
:"ts": "2024-07-28T14:46:27.0000005+02:00"
Examples for 4.1.3 (in 2023.0.3):
j.u.Date
:"ts": 1722253394807
j.t.Instant
:"ts": 1722253298.240253000
j.t.ZonedDateTime
:"ts": 1722170787.000000500
Another peculiar choice is that
j.u.Date
is now serialized as milliseconds whilejava.time
classes as seconds with a decimal part.The code I used to generate a message is the following:
The sample project I used to investigate uses Java 21 and has the following dependencies: