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 batch request returns messages before start time #6032

Open scottf opened 1 month ago

scottf commented 1 month ago

Behavior

Direct get batch with start_time returns message before start_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 a time in the future {"batch":3,"start_time":"2024-11-05T13:31:29.144000000Z","next_by_subj":"testSubject"}
  4. View the messages coming in on the subscription, you will receive the 1 message