vx-common-amqp 0.3.1 → 0.3.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2251542292e73fae9c86662ae4b6888e0752d238
|
4
|
+
data.tar.gz: 01e1467005dea28437f1a44eedbb0202d8cc9cea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a142abeb99aa4f54a4d2135817fe211b28468545dc304b06528de30502951ff897573d21391dbb4b21c245fb729c8bb56028eef5a703ae3692b9cb51e2d18db2
|
7
|
+
data.tar.gz: b877c2bf0be744fef8f7e11c34e11f19dde8cbe20fcf799dc0e0f70cbaa0e077b8e860b6c7690e4a4cdfb1675b57c794d4ebd00ab6404ac122fb25ecde608eee
|
@@ -8,6 +8,7 @@ module Vx
|
|
8
8
|
consumer_id: self.class.consumer_id,
|
9
9
|
consumer: self.class.consumer_name,
|
10
10
|
multiple: multiple,
|
11
|
+
payload: payload,
|
11
12
|
uuid: uuid,
|
12
13
|
}
|
13
14
|
self.class.session.channel.ack delivery_info.delivery_tag, multiple
|
@@ -18,6 +19,7 @@ module Vx
|
|
18
19
|
instrumentation = {
|
19
20
|
consumer_id: self.class.consumer_id,
|
20
21
|
consumer: self.class.consumer_name,
|
22
|
+
payload: payload,
|
21
23
|
multiple: multiple,
|
22
24
|
requeue: requeue,
|
23
25
|
uuid: uuid,
|
@@ -18,7 +18,12 @@ module Vx
|
|
18
18
|
x = declare_exchange
|
19
19
|
q = declare_queue
|
20
20
|
|
21
|
-
instrumentation = {
|
21
|
+
instrumentation = {
|
22
|
+
exchange: x.name,
|
23
|
+
queue: q.name,
|
24
|
+
consumer_id: consumer_id,
|
25
|
+
consumer: consumer_name
|
26
|
+
}
|
22
27
|
instrument("start.consumer.amqp", instrumentation)
|
23
28
|
|
24
29
|
q.bind(x, bind_options)
|
@@ -33,16 +38,8 @@ module Vx
|
|
33
38
|
unpacked = nil
|
34
39
|
delivery_info, properties, payload = q.pop(ack: ack)
|
35
40
|
|
36
|
-
instrumentation = {
|
37
|
-
properties: properties,
|
38
|
-
consumer_id: consumer_id,
|
39
|
-
consumer: consumer_name
|
40
|
-
}
|
41
|
-
|
42
41
|
if payload
|
43
|
-
|
44
|
-
unpacked = deserialize_message properties, payload
|
45
|
-
end
|
42
|
+
unpacked = deserialize_message properties, payload
|
46
43
|
end
|
47
44
|
|
48
45
|
[unpacked, delivery_info, properties]
|
@@ -57,21 +54,19 @@ module Vx
|
|
57
54
|
delivery_info, properties, payload = q.pop(ack: ack)
|
58
55
|
|
59
56
|
if payload
|
60
|
-
|
61
|
-
|
57
|
+
payload = deserialize_message properties, payload
|
58
|
+
result = nil
|
59
|
+
uuid = SecureRandom.uuid
|
62
60
|
|
63
61
|
instrumentation = {
|
64
|
-
properties: properties,
|
65
62
|
consumer_id: consumer_id,
|
66
63
|
consumer: consumer_name,
|
64
|
+
payload: payload,
|
67
65
|
uuid: uuid
|
68
66
|
}
|
69
67
|
|
70
68
|
instrument("start_processing.consumer.amqp", instrumentation)
|
71
69
|
instrument("process.consumer.amqp", instrumentation) do
|
72
|
-
instrument("unpacking.consumer.amqp", instrumentation) do
|
73
|
-
payload = deserialize_message properties, payload
|
74
|
-
end
|
75
70
|
result = run_instance delivery_info, properties, payload, uuid
|
76
71
|
end
|
77
72
|
|
@@ -87,6 +82,7 @@ module Vx
|
|
87
82
|
inst.properties = properties
|
88
83
|
inst.delivery_info = delivery_info
|
89
84
|
inst.uuid = uuid
|
85
|
+
inst.payload = payload
|
90
86
|
end.perform payload
|
91
87
|
end
|
92
88
|
|