Commit d0d72a7
committed
Fix fetch wait duration validation for NATS backend
RqueueMessagePoller passes Duration.ZERO when calling pop(), which works
for Redis (used as 'no timeout'). However, JetStreamMessageBroker forwards
this to JetStream's fetch() API, which requires a positive duration and
rejects ZERO.
Fix: Treat ZERO duration the same as null - use config.getDefaultFetchWait()
instead. This maintains compatibility with the Redis poller interface while
ensuring JetStream gets a valid fetch duration.
Solves: "Fetch wait duration must be supplied and greater than 0" errors
during polling.
Assisted-By: Claude Code1 parent 2afd2fd commit d0d72a7
1 file changed
Lines changed: 3 additions & 1 deletion
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
0 commit comments