You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The eventTime timestamp should be getting at the consumer side if its set at the time of producing the message
Actual behavior
after setting eventTime in the producer message, getting eventTime as 0 in the consumed message.
Steps to reproduce
Set
p.options.DisableBatching=true
and produce messages with eventTime: msg := &pulsar.ProducerMessage{ EventTime: time.Now().UTC(), Payload: []byte(data) }
_, err = producer.Send(context.Background(), msg)
on the consumer side: ts := msg.EventTime()
ts will get as a 1970-01-01 05:30:00 +0530 IST
in pulsar lib, we are adding eventTime to message metadata only when batching is enabled.
Fixes#1013
### Motivation
The event time is not set when batching is disabled. The event time will be lost.
This is a regression bug in 0.10.0.
### Modifications
* Set the event time when sending single message
Expected behavior
The eventTime timestamp should be getting at the consumer side if its set at the time of producing the message
Actual behavior
after setting eventTime in the producer message, getting eventTime as 0 in the consumed message.
Steps to reproduce
Set
p.options.DisableBatching=true
and produce messages with eventTime:
msg := &pulsar.ProducerMessage{ EventTime: time.Now().UTC(), Payload: []byte(data) }
_, err = producer.Send(context.Background(), msg)
on the consumer side:
ts := msg.EventTime()
ts will get as a
1970-01-01 05:30:00 +0530 IST
in pulsar lib, we are adding eventTime to message metadata only when batching is enabled.
pulsar-client-go/pulsar/producer_partition.go
Line 750 in 9cc6ee0
System configuration
Pulsar version: 0.10.0
The text was updated successfully, but these errors were encountered: