Commit a493eeb
committed
Delete BrokerMessagePoller; route NATS through DefaultRqueuePoller
Replace the separate BrokerMessagePoller/ConsumerNameResolver path with
the existing DefaultRqueuePoller + QueueThreadPool + RqueueExecutor
pipeline used by the Redis backend.
Key changes:
- Delete BrokerMessagePoller, ConsumerNameResolver and their tests.
- Add backend-neutral methods to MessageBroker SPI: parkForRetry,
moveToDlq, scheduleNext, getVisibilityTimeoutScore,
extendVisibilityTimeout. RedisMessageBroker overrides each with the
existing Redis template calls.
- Refactor PostProcessingHandler, JobImpl, RqueueExecutor and
RqueueMessagePoller to use MessageBroker instead of the Redis-specific
RqueueMessageTemplate.
- RqueueMessageListenerContainer.initialize() resolves an effective
broker (injected or a RedisMessageBroker wrapper) and removes the
usesPrimaryHandlerDispatch==false branch that wired the old path.
- JetStreamMessageBroker: set usesPrimaryHandlerDispatch=true so NATS
queues flow through the standard poller; add resolveConsumerName
fallback so a null consumerName from RqueueMessagePoller gets a stable
"rqueue-<queue>" default.
- Update all affected tests to mock MessageBroker instead of
RqueueMessageTemplate.
Assisted-By: Claude Code1 parent 2512e44 commit a493eeb
21 files changed
Lines changed: 220 additions & 1632 deletions
File tree
- rqueue-core/src
- main/java/com/github/sonus21/rqueue
- core
- spi
- redis
- listener
- test/java/com/github/sonus21/rqueue/listener
- rqueue-nats/src
- main/java/com/github/sonus21/rqueue/nats/js
- test/java/com/github/sonus21/rqueue/nats
- rqueue-spring-boot-nats-example/src/main/java/com/github/sonus21/rqueue/example
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
94 | 148 | | |
95 | 149 | | |
96 | 150 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
149 | 200 | | |
150 | 201 | | |
151 | 202 | | |
| |||
0 commit comments