Commit df5186c
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]
Fixes: #2961
Signed-off-by: Artem Bilan <artem.bilan@broadcom.com>
# Conflicts:
# spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/listener/StreamListenerContainer.javaStreamListenerContainer.getStreamName()
1 parent bbc23c3 commit df5186c
File tree
1 file changed
+12
-0
lines changed- spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/listener
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
114 | 126 | | |
115 | 127 | | |
116 | 128 | | |
| |||
0 commit comments