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>
Fixes: https://github.com/spring-projects/spring-amqp/issues/2953
* Migrate nullability to JSpecify
* Add `net.ltgt.errorprone` Gradle plugin and respective `NullAway` configuration
* Remove redundant `com.github.spotbugs` since it covered now by the `net.ltgt.errorprone` tool
* Use Java `23` for the latest fixes on Java nullability
* Fix JavaDocs and `this-escape` warnings in the code
* Use `main` for reusable workflows which come already with Java `23`
* Fix all the nullability problems in the project
Fixes https://github.com/spring-projects/spring-amqp/issues/2522
The latest `com.rabbitmq:stream-client` has some convenient fixes for
local environment development (including Docker image).
Therefore, fix all the Streams test to use just `.port(streamPort())` option
for the `Environment` instead of custom `addressResolver`
Resolves https://github.com/spring-projects/spring-amqp/issues/2540
Usability improvements: New SuperStream builder
builder provide a way to configure:
- maxAge
- maxLength
- maxSegmentSize
Usability improvements: New SuperStream builder
License
Usability improvements: New SuperStream builder
Fix style tests and add a new one for the super stream builder
Usability improvements: New SuperStream builder
Covered x-initial-cluster-size. Fixes after review
Resolves https://github.com/spring-projects/spring-amqp/issues/2467
* Fix race in test.
* Add tracing test; fix possible NPEs in stream contexts.
* Change input dir for doc generation.
* Strip package from new conventions in gen'd doc.
* Docs; polishing; fix doc generation for duplicate enum values.
* Use stream convention, regardless of native listener or not.
If a node was returned by the REST call and the node was not in the map
of nodes to addreses, the loop exited early.
The incorrect variable was being tested (never null).
Also add a more sophisticated integration test - using 2 brokers, ensure that
the correct broker is located for the queue.
Resolves https://github.com/spring-projects/spring-amqp/issues/1419
Use Spring WebFlux instead, while allowing the user to choose some other technology
in the `LocalizedQueueConnectionFactory`.
* Rename DefaultNodeLocator; add generics.
* Remove unnecessary dependencies.
Resolves https://github.com/spring-projects/spring-amqp/issues/1507
Refactor for latest snapshots; add documentation generation.
Use NOOP registry and supplier for context.
Also fix class tangles.
Disable auto doc generation and polish manually.
* Fix observation of batch listeners; disable more tests temporarily.
* Add remoteServiceName to contexts; fix race in test.
* Add tests for remoteServiceName.
* Set the service name instead of overriding the getter.
* Re-enable tests.
* Switch to Spring Snapshots, Revert "Re-enable tests."
This reverts commit e0a80e372fe0e5954ddc734e2fbbf5aabe457fc9.
* Disable logback adjuster.
* Disable logback appender tests.
Resolves https://github.com/spring-projects/spring-amqp/issues/1455
Add an advice chain to the stream listener container and its factory.
Add a `StreamMessageRecoverer` for native stream messages.
Add a retry interceptor to work with native stream messages.
**cherry-pick to 2.4.x**
* Add since to new setter.
Support for SI `RabbitStreamMessageHandler`, which will live in
the SCSt RabbitMQ binder until SI 6.0 due to versioning.
- expose converters
- use producer message builder if no stream converter provided
* Remove streams before tests; AfterAll has a timing problem.
- pass in the listener id, if available
- narrow to a specific interface to aid Boot auto configuration
- add null check
* Apply Suggestion to add @FuntionalInterface