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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +17 -1
- data/lib/rabbit/receiving/receive.rb +5 -1
- data/lib/rabbit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8542a34d9178bfbaa0b060bedeabcd4811473def27cae7a52bafb34d6706939
|
4
|
+
data.tar.gz: da404d62299855fbdd94c037487e3ccd177818d1d684ce5db74ebad17dfad1dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/rabbit/version.rb
CHANGED
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.
|
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-
|
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.
|
280
|
+
rubygems_version: 3.2.3
|
281
281
|
signing_key:
|
282
282
|
specification_version: 4
|
283
283
|
summary: Rabbit (Rabbit Messaging)
|