SpinGo / op-rabbit

The Opinionated RabbitMQ Library for Scala and Akka
Other
232 stars 73 forks source link

Remove deprecated API usage to support Akka 2.6 #194

Open carstenlenz opened 4 years ago

carstenlenz commented 4 years ago

Hi.

We noticed that op-rabbit uses an akka-streams API that got removed in Akka 2.6. Currently this is hindering an update to Play 2.8 which brings in Akka 2.6.

I experimented with changing the akka-streams module to allow op-rabbit to be used with 2.6 as well as 2.5.

I created this pull request to discuss this - I do not expect it to be ready for merging. Especially the akka-streams version should be downgraded to 2.5 - currently 2.6 to ensure compatibility with it.

It would be great if you could have a look at it and provide me with some feedback about it. That would be very appreciated :)

Cheers Carsten (and others)

vic commented 4 years ago

Hello @carstenlenz

I'm also interested in keeping op-rabbit up to date with current akka versions since we've been using it on production and are also looking to upgrade our akka stack.

As a first step in that direction we've been working on upgrading acked-streams to akka25 which is a direct dependency for op-rabbit, second, we will be upgrading op-rabbit's dependency on akka25 itself and on the updated acked-streams version. If all goes fine, I guess we could take your changes and also upgrade both to akka26, however I guess that would be much better done in two steps, akka25 first and then akka26.

Will take a look at your changes and will keep you updated.

EDIT: btw, these upgrades will also cross-compile to scala 2.12 and 2.13.

carstenlenz commented 4 years ago

Hi @vic ,

thank you ! I'm glad there are others also taking care. 🙂

We are already running the current stack (op-rabbit with acked-streams) with this MR pulled in in a fork on production on 2.5. We did not come across any issues.

We were already testing the current stack on 2.6 with this MR pulled in and there also were no issues. The upgrade to Play 2.8 (coming with Akka 2.6) is planned.

Akka (Streams) is binary compatible from 2.4 to 2.6 with the exceptions documented in their binary compatibility rules. Most problems come from deprecations (as in this case) where deprecated stuff is (finally) removed. Documented in their migration guides 2.4->2.5 and 2.5->2.6.

Maybe one could add a compile-only dependency on Akka 2.6 to ensure that no deprecated API is used but stick to Akka 2.5 runtime dependency? It is not strictly mandatory to drop 2.5 support to support Akka 2.6. But of course it should be checked.

The 2.13 support is great to hear! 👍

vic commented 4 years ago

FYI all test green on scala2.13 https://github.com/SpinGo/op-rabbit/pull/195#issuecomment-659653372 (this PR depends on a jitpack version of acked-streams for scala2.13), but I guess we are all set for upgrading to both akka26 (with your PR changes) and having published versions for scala 2.12 and 2.13 :)