treuherz commented on issue #1154:
URL: 
https://github.com/apache/pulsar-client-go/issues/1154#issuecomment-1884603413

   It seems like the code around tracking message IDs has evolved in such a way 
to completely break this metric. In both places this metric is observed 
([1](https://github.com/apache/pulsar-client-go/blob/58941348a7fa467df21ddd9a3ddf11e9103cc4ac/pulsar/consumer_partition.go#L686-L686),
 
[2](https://github.com/apache/pulsar-client-go/blob/58941348a7fa467df21ddd9a3ddf11e9103cc4ac/pulsar/consumer_partition.go#L686-L686))
 it happens immediately after initialisation of a `trackingMessageID` without 
setting the `receivedTime` field. This has two obvious problems.
   
   Firstly, the observation is relying on a field that isn't set, so the 
operation to get time since the receivedtime will always produce nonsense 
values. Secondly, because the struct owning that field was only just created, 
even if it had been set the value would be useless.
   
   I would be happy to raise a PR to fix this, but the intention of the 
existing code doesn't make any sense to me. Some guidance from maintainers on 
how this is supposed to work would be really appreciated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to