Skip to content

Commit

Permalink
Merge pull request #152 from avast/PreparingV9
Browse files Browse the repository at this point in the history
Version 9 - reassembling the tractor
  • Loading branch information
jendakol authored Mar 18, 2022
2 parents 077bfed + bb5788c commit f3cedfb
Show file tree
Hide file tree
Showing 85 changed files with 4,416 additions and 2,827 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
strategy:
fail-fast: false
matrix:
scala-version: [2.12.13, 2.13.5]
scala-version: [ 2.12.13, 2.13.8 ]
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3.0.0
with:
fetch-depth: 100
- name: Fetch tags
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
scala-version: [2.12.13, 2.13.5]
scala-version: [ 2.12.13, 2.13.8 ]
steps:
- uses: actions/[email protected]
with:
Expand All @@ -24,4 +24,4 @@ jobs:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
33 changes: 0 additions & 33 deletions Migration-5-6.md

This file was deleted.

9 changes: 0 additions & 9 deletions Migration-6-6_1.md

This file was deleted.

15 changes: 0 additions & 15 deletions Migration-6_1-7.md

This file was deleted.

34 changes: 34 additions & 0 deletions Migration-8-9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Migration from 8.x.x to 9.0.x

In general, there are MANY changes under the hood, however, only a few changes in the API. The most relevant changes are:

1. `extras-cactus` module was removed.
2. `StreamedDelivery` has now only new `handleWith` method, forcing the user to correct behavior and enabling much more effective tasks
processing and canceling.
3. The client now explicitly supports CorrelationId handling.
Producer has `implicit cidStrategy: CorrelationIdStrategy` parameter (with `CorrelationIdStrategy.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 and `X-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).
4. [`PoisonedMessageHandler`](README.md#poisoned-message-handler) is now a part of the core. It's not wrapping your _action_ anymore,
however, there exists only a few options, describable in configuration.
5. `DeliveryResult.Republish` now has `countAsPoisoned` parameter (defaults to `true`) determining whether the PMH (if configured) should
count the attempt or not.
6. Logging in general was somewhat _tuned_.
7. The client uses Cats-Effect version of `Monitor` from [Metrics library](https://github.com/avast/metrics).

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:

1. The library is still cross-compiled to Scala 2.12 and 2.13.
2. All consumers are now free of boilerplate code - new `ConsumerBase` class is a dependency of all consumers.
3. `DefaultRabbitMQClientFactory` was redesigned and it's a class now.
4. "Live" tests were split to `BasicLiveTest`, `StreamingConsumerLiveTest` and `PoisonedMessageHandlerLiveTest`.

---

The client now (9.0.0) uses circe 0.14.1 (only [extras-circe module](extras-circe)), pureconfig 0.17.1 (
only [pureconfig module](pureconfig)), still cats 2 and cats-effect 2.
Loading

0 comments on commit f3cedfb

Please sign in to comment.