Commit 0729a57
authored
Add convenient
It would be nice to have `StreamListenerContainer.getStreamName()` method to fulfill need to dynamically stop/start listeners in reaction of broker events.
Let's say I need to react to RabbitMQ broker events of queue.created / queue.deleted and I need to start and stop listeners, which are assigned to these streams.
Currently I need to create an extra map of `listenerId` to `streamName` OR include `streamName` in `listenerId` (e.g. `listener:{streamName}`) to be able to carry our operations on listener.
A simple getter for `streamName` on the `StreamListenerContainer` would allow me to react to these changes dynamically without extra code effort.
Signed-off-by: David Horak <horak.david@protonmail.com>
[artem.bilan@broadcom.com: Fix JavaDoc for a new method. Fix Commit message]
**Auto-cherry-pick to `3.2.x`**
Signed-off-by: Artem Bilan <artem.bilan@broadcom.com>StreamListenerContainer.getStreamName()
1 parent ea16a02 commit 0729a57
File tree
1 file changed
+10
-0
lines changed- spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/listener
1 file changed
+10
-0
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| |||
0 commit comments