nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16k stars 1.41k forks source link

Direct Get multi last for request returns messages after up_to_time #6077

Open scottf opened 2 weeks ago

scottf commented 2 weeks ago

Behavior

Direct get multi last for with up_to_time returns message before up_to_time

Server version

v2.11.0-dev

Steps to reproduce

  1. create a new stream and publish exactly 1 message. Note the message time i.e. 2024-11-05T13:31:19.133640700Z
  2. subscribe to a reply-to
  3. publish a direct get batch request with an up_to_time well before the message time. {"multi_last":["testSubject"],"up_to_time":"2024-11-05T13:31:29.144000000Z"}
  4. View the messages coming in on the subscription, you will receive the 1 message