README.md in advanced-sneakers-activejob-0.3.6 vs README.md in advanced-sneakers-activejob-0.4.0

- old
+ new

@@ -64,11 +64,11 @@ **Delayed messages are not handled!** If job is delayed `GuestsCleanupJob.set(wait: 1.week).perform_later(guest)` and there is no proper routing defined at the moment of job execution, it would be lost. ## Custom message options -Advanced sneakers adapter allows to set custom message options (e.g. [routing keys](https://www.rabbitmq.com/tutorials/tutorial-four-ruby.html)). +Advanced sneakers adapter allows to set [custom message options](http://reference.rubybunny.info/Bunny/Exchange.html#publish-instance_method) (e.g. [routing keys](https://www.rabbitmq.com/tutorials/tutorial-four-ruby.html)) on class-level. ```ruby class MyJob < ActiveJob::Base queue_as :some_name @@ -94,9 +94,17 @@ # ProcessUserData.new(user).call end end ``` +And also supports custom message options per job +```ruby +MyJob.set(priority: 1, headers: { 'foo' => 'bar' }).perform_later('baz') +``` + +Read more about message properties: +- https://www.rabbitmq.com/publishers.html#message-properties +- http://reference.rubybunny.info/Bunny/Exchange.html#publish-instance_method Take into accout that **custom message options are used for publishing only**. ## How to separate ActiveJob consumers