I am trying to send some information with Kafka. I have a class to handle this task. The class includes a private variable called "timestamp" of type Instant. When the timestamp is generated, it renders correctly. However, when I receive the message on the consumer side, the time stamp is not readable.
It looks like this "timestamp": 1685968244.889278400
Additionally, I have a response class defined as follows:
public class Response<T> {
private T data;
private String statusCode;
private String statusMessage;
private Instant timestamp;
}
When I converted timestamp
atribute to String, everything looks well but I want to render the timestamp as below:
"timestamp": 2023-06-05T15:07:06.497159Z
How can I do that ?