Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Add V4 migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorszun committed Feb 27, 2022
1 parent ae6958c commit d6233ff
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ GenRMG requires Elixir 1.11 or newer, running on at least OTP 22.

```elixir
def deps do
[{:gen_rmq, "~> 3.0"}]
[{:gen_rmq, "~> 4.0"}]
end
```

## Migrations

Version `3.0.0` has been released. Please check [how to migrate to gen_rmq `3.0.0`][migrating_to_300].
Version `4.0.0` has been released. Please check [how to migrate to gen_rmq `4.0.0`][migrating_to_400].

## Examples

Expand Down Expand Up @@ -141,6 +141,7 @@ GenRMQ.Publisher.publish(Publisher, Jason.encode!(%{msg: "msg"}))

- [Version 1.0.0][migrating_to_100]
- [Version 3.0.0][migrating_to_300]
- [Version 4.0.0][migrating_to_400]

## Running Tests

Expand Down Expand Up @@ -185,6 +186,7 @@ Copyright (c) Meltwater Inc. [underthehood.meltwater.com][underthehood]
[amqp]: https://github.com/pma/amqp
[migrating_to_100]: https://github.com/meltwater/gen_rmq/blob/master/documentation/migrations/1.0.0.md
[migrating_to_300]: https://github.com/meltwater/gen_rmq/blob/master/documentation/migrations/3.0.0.md
[migrating_to_400]: https://github.com/meltwater/gen_rmq/blob/master/documentation/migrations/4.0.0.md
[consumer_doc]: https://github.com/meltwater/gen_rmq/blob/master/lib/consumer.ex
[docker_compose]: https://docs.docker.com/compose/
[github_prs]: https://help.github.com/articles/about-pull-requests/
Expand Down
28 changes: 28 additions & 0 deletions documentation/migrations/4.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Migrating to version 4.0.0
==========================

Since version `4.0.0` we have introduced a couple of non-backwards compatible changes. This guide
helps you migrate from previous versions (< `4.0.0`).

# Migration steps

## Upgrade Elixir and OTP

* Ensure you are using at least `Elixir 1.11`
* Ensure you are using at least `OTP 22.1`

## Stop using removed config options

* `uri` - replaced with `connection`
* `queue_ttl` - replaced with `queue_options.arguments`
* `queue_max_priority` - replaced with `queue_options.arguments`

Check [our guide](../guides/consumer/with_custom_queue_configuration.md) for detailed examples.

## Stop using removed `state` attribute from [GenRMQ.Message](../../lib/message.ex)` struct

* `state` attribute has been removed from `GenRMQ.Message` struct
* `channel` attribute has been added to `GenRMQ.Message` struct

So, if your application has been dependant on input channel from `state.in`, now
you can get it from `channel` property.

0 comments on commit d6233ff

Please sign in to comment.