Skip to content
Discussion options

You must be logged in to vote

This is intended. You just received the schedule itself which is stored on the same stream. Changing the Nats-Schedule: @at <ts> to be earlier, you'll see it gets delivered after the specified delay.

# Create the stream, allowing message scheduling.
nats str add test_stream --subjects 'test_stream.>' --defaults --allow-schedules

# In another window, start listening to the messages on the stream.
nats sub --stream test_stream

# Use JetStream publishing to know the schedule was persisted into the stream.
nats pub -J 'test_stream.subject' 'help me' -H "Nats-Schedule: @at 1970-01-01T00:00:00Z" -H "Nats-Schedule-Target: test_stream.123"

The other window has then received both messages, the s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sheldygg
Comment options

Answer selected by sheldygg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants