WithScheduleAt schedules a message for one-time delivery at a specific time. Requires [StreamConfig.AllowMsgSchedules] to be enabled.
(t time.Time)
| 721 | // WithScheduleAt schedules a message for one-time delivery at a specific time. |
| 722 | // Requires [StreamConfig.AllowMsgSchedules] to be enabled. |
| 723 | func WithScheduleAt(t time.Time) PublishOpt { |
| 724 | return func(opts *pubOpts) error { |
| 725 | opts.schedule = "@at " + t.UTC().Format(time.RFC3339) |
| 726 | return nil |
| 727 | } |
| 728 | } |
| 729 | |
| 730 | // WithScheduleEvery schedules a message for repeated delivery at the given |
| 731 | // interval. The minimum interval is 1 second. |
no outgoing calls