Resolves https://github.com/spring-projects/spring-amqp/issues/2482
`forceStop` means stop after the current record and requeue all prefetched.
Just close the channel - canceling the consumer first causes a race condition which
could allow another exclusive or single-active consumer to start processing while
this container is still running.
Also support async stop on DMLC (previously only available on the SMLC).
**cherry-pick to 2.4.x**
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.
* GH-1210: Add Kotlin suspend functions support
Fixes https://github.com/spring-projects/spring-amqp/issues/1210
Kotlin Coroutines are essentially `Future` wrapping.
Therefore, it is natural to have `suspend` support on `@RabbitListener`
methods as we do now for `CompletableFuture` and `Mono`
* Introduce some utilities since we cannot reuse existing from Spring Messaging:
they are there about Kotlin Coroutines only for reactive handlers
* Some code clean up in the `RabbitListenerAnnotationBeanPostProcessor`
for the latest Java
* Add optional dep for `kotlinx-coroutines-reactor` and document the feature
* * Remove unused import
- single task for spans and metrics
- always gen and remove packages from file names
* Fix link in What's New; add observation properties to container factory.
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.
* GH-1444: Listener Observability Initial Commit
- expand scope to include error handler: https://github.com/spring-projects/spring-amqp/pull/1287
- tracing can't be used with a batch listener (multiple messages in listener call)
* Rename Sender/Receiver contexts and other PR review comments.
* Rename contexts to Rabbit...; supply default KeyValues via the conventions.
* Javadoc polishing.
* Don't add default KV to high-card KVs.
* Fix previous commit.
* Fix contextual name (receiver side).
* Fix checkstyle.
* Polish previous commit.
* Fix contextual name (sender side)
* Remove contextual names from observations.
* Fix checkstyle.
* Remove customization of KeyValues from conventions.
* Add `getDefaultConvention()` to observations.
* Fix since 3.0.
* Support wider convention customization.
* Convention type safety.
* Fix Test - not sure why PR build succeeded.
* Add Meters to ObservationTests.
* Fix checkstyle.
* Make INSTANCE final.
* Add integration test.
* Test all available integrations.
* Remove redundant test code.
* Move getContextualName to conventions.
* Add docs.
* Fix doc link.
Co-authored-by: Artem Bilan <abilan@vmware.com>
* Remove unnecessary method overrides; make tag names more meaningful.
* Move getName() from contexts to conventions.
* Fix Race in Test
* Fix Race in Test.
Co-authored-by: Artem Bilan <abilan@vmware.com>
Resolves https://github.com/spring-projects/spring-amqp/issues/1489
- allow listeners to consume `Collection<?>` as well as `List<?>`
- detect a non-batch listener method in the batch adapter
- coerce `batchListener` to `true` when `consumerBatchEnabled` is true
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.
Resolves https://github.com/spring-projects/spring-amqp/issues/1420
- detect and use `charset` in `contentType` when present
- allow Jackson to determine the decode `charset` via `ByteSourceJsonBootstrapper.detectEncoding()`
- allow configuration of the `MimeType` to use, which can include a `charset` parameter
**cherry-pick to main - will require what's new fix**
* Fix typo in doc.
# Conflicts:
# src/reference/asciidoc/whats-new.adoc
Resolves https://github.com/spring-projects/spring-amqp/issues/1422
Broker-named queues did not work with `@RabbitListener` because the BPP
only passed the name of the queue bean, not the bean itself, into the
endpoint.
Support bean injection; fall back to the previous behavior if a mixture
of beans and names are encountered (the containers don't support both
types of configuration).
Add a note to the javadoc to indicate that broker-named queues are not
supported via `queuesToDeclare` and `bindings` properties; such queues
must be declared as discrete beans.
* Docs.
**cherry-pick to `2.4.x` & `2.3.x`**