rabbit_messaging 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c92b806429685bd1947aa26b756a708e57c72879add099ca66f48bf54cc5a572
4
- data.tar.gz: 0f4154541a07263b69dbebd4f7b28ba5b2afe63c8ea4f190400979c3af464622
3
+ metadata.gz: b8542a34d9178bfbaa0b060bedeabcd4811473def27cae7a52bafb34d6706939
4
+ data.tar.gz: da404d62299855fbdd94c037487e3ccd177818d1d684ce5db74ebad17dfad1dd
5
5
  SHA512:
6
- metadata.gz: 2e8dcb9f888a8093f3754a59e8948cc40bdbe6bc2e9109eb4306ec1f0c82cecb4a461e392fdc47601ff60c26893f13bb9f075859fd8b99191812d7eb22e7e564
7
- data.tar.gz: 3019367324566388faf7bdd1926ef2b615e49fd05083a53ab57ba676559c8fa25212002b560497701777e079669821505aba17bc1b78cc46a80e38bf5665590c
6
+ metadata.gz: 06b75c450a69a43b4926b5fa4c1581a3bcb3d728ce826050d4ea4e002dbb38f5729d3c3203d9c4fc916d843e2bd8cf0f1c14fc6b58ac670b0a58a821408f9c9f
7
+ data.tar.gz: 34ac8124872567403c219a98d682644c80f43f2be201d085b9c7c58258b852a4624b67b64a78ad0b1eb99069734efa3af602db0c0ae566a3175fefb56b774a28
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.11.0] - 2021-05-05
5
+ ### Added
6
+ - `Rabbit.config.receiving_job_class_callable` now receives the full message context (with `message`, `delivery_info` and `arguments` (see the `Rabbit::Receiving::Receive`));
7
+
4
8
  ## [0.10.0] - 2021-03-05
5
9
  ### Added
6
10
  - logging message headers
data/README.md CHANGED
@@ -67,7 +67,23 @@ require "rabbit_messaging"
67
67
 
68
68
  * `receiving_job_class_callable` (`Proc`)
69
69
 
70
- Custom ActiveJob subclass to work with received messages.
70
+ Custom ActiveJob subclass to work with received messages. Receives the following attributes as `kwarg`-arguments:
71
+
72
+ * `:arguments` - information about message type (`type`), application id (`app_id`), message id (`message_id`);
73
+ * `:delivery_info` - information about `exchange`, `routing_key`, etc;
74
+ * `:message` - received RabbitMQ message (often in a `string` format);
75
+
76
+ ```ruby
77
+ {
78
+ message: '{"hello":"world","foo":"bar"}',
79
+ delivery_info: { exchange: "some exchange", routing_key: "some_key" },
80
+ arguments: {
81
+ type: "some_successful_event",
82
+ app_id: "some_group.some_app",
83
+ message_id: "uuid",
84
+ }
85
+ }
86
+ ```
71
87
 
72
88
  * `exception_notifier` (`Proc`)
73
89
 
@@ -57,6 +57,10 @@ class Rabbit::Receiving::Receive
57
57
  end
58
58
 
59
59
  def job_class
60
- Rabbit.config.receiving_job_class_callable&.call || Rabbit::Receiving::Job
60
+ Rabbit.config.receiving_job_class_callable&.call(
61
+ message: message,
62
+ delivery_info: delivery_info,
63
+ arguments: arguments,
64
+ ) || Rabbit::Receiving::Job
61
65
  end
62
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rabbit
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umbrellio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-05 00:00:00.000000000 Z
11
+ date: 2021-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  - !ruby/object:Gem::Version
278
278
  version: '0'
279
279
  requirements: []
280
- rubygems_version: 3.2.11
280
+ rubygems_version: 3.2.3
281
281
  signing_key:
282
282
  specification_version: 4
283
283
  summary: Rabbit (Rabbit Messaging)