In general, there are MANY changes under the hood, however, only a few changes in the API. The most relevant changes are:
extras-cactus
module was removed.StreamedDelivery
has now only newhandleWith
method, forcing the user to correct behavior and enabling much more effective tasks processing and canceling.- The client now explicitly supports CorrelationId handling.
Producer hasimplicit cidStrategy: CorrelationIdStrategy
parameter (withCorrelationIdStrategy.FromPropertiesOrRandomNew
as a default) which enables you to configure how the CorrelationId should be derived/generated. You can implement your own strategy to suit your needs.
You can also easily get the CorrelationId from message properties on the consumer side. The CID (on consumer side) is taken from both AMQP properties andX-Correlation-Id
header (where the property has precedence and the header is just a fallback). It's propagated to logs in logging context (not in message directly). PoisonedMessageHandler
is now a part of the core. It's not wrapping your action anymore, however, there exists only a few options, describable in configuration.DeliveryResult.Republish
now hascountAsPoisoned
parameter (defaults totrue
) determining whether the PMH (if configured) should count the attempt or not.- Logging in general was somewhat tuned.
- The client uses Cats-Effect version of
Monitor
from Metrics library.
As there are only very minor changes in the API between 8 and 9 versions, version 8 won't be supported any more (unless necessary).
Some additional notes, mainly for library developers:
- The library is still cross-compiled to Scala 2.12 and 2.13.
- All consumers are now free of boilerplate code - new
ConsumerBase
class is a dependency of all consumers. DefaultRabbitMQClientFactory
was redesigned and it's a class now.- "Live" tests were split to
BasicLiveTest
,StreamingConsumerLiveTest
andPoisonedMessageHandlerLiveTest
.
The client now (9.0.0) uses circe 0.14.1 (only extras-circe module), pureconfig 0.17.1 ( only pureconfig module), still cats 2 and cats-effect 2.