sensu-transport-snssqs-ng 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 027a5e31902b641c04dc3ec96f7bee0d790e2073
4
- data.tar.gz: 0e7aaea1b566dd4ebe1ed88673f06483c929dc6e
3
+ metadata.gz: bb050cdeb66bf160f0d2593a15724b0c192fa09d
4
+ data.tar.gz: 971549110b5c9385749abec84ad6bfd5e4f13294
5
5
  SHA512:
6
- metadata.gz: 3995ccd07c3b7341f706b981f7aafa1915598c86b3d0252d9ea40b280daa1a5f5fa92c5bd45c69d3e47eb55ad57a34db55d9479bced3982d8f7c30a9df32f197
7
- data.tar.gz: 94c08b3ba5332d65fc85bb5a5afcea962b4b0095e1bf5ee448e3da1784ab6bc939971632ed8b4b96bf82865235e1bf8d5958217b775b5fb6a3b0ba703379b9f4
6
+ metadata.gz: 8989cb0bcf9e9020fb165bec1709816af38dd7a18187a736c18ffe300a47e7deca7339b325be1528f2c2d2c1e21cdeff05cefdaf9049643058f7bfb418237fa5
7
+ data.tar.gz: 9a9f3b696dfa0f9ebcbc533f70828bd9c89aed1f735e74ee596c777d77497da4073582fd48447b38dd5080a902e11954dbf6691e7d1b8512edd36fdd724695d7
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,4 @@
1
- ��ͯ?�%��)L����I&�?��(_�~RW��ov���)�lV�K�Z�ɍD�]�#�3����M��D��Ѽ�ۘpь���ݠ�0PD)
2
- -$쮀x����z����Ά5
1
+ C"���C���1���k��4��dd���)���=6
2
+ ���ی�����( 3|�%v���l�!�bV�a˽����X{v
3
+ Js`Q4��Ȏ�lIi�K3K ��k����5��_[f�g:^��"���\�g�����=�w�us��wɦ�G����Vf�-ۡ ٩�
4
+ /���c%K��`К�Vy��,ި�i)g�
@@ -186,16 +186,24 @@ module Sensu
186
186
  # if this is a raw SNS message, it exists in the root of the message and no conversion is needed
187
187
  # if it doesn't, it is an encapsulated messsage (meaning the SNS message is a stringified JSON in the body of the SQS message)
188
188
  begin
189
- if !msg.key? 'message_attributes'
189
+ self.logger.debug('[transport-snssqs] msg parse start')
190
+ unless msg.key? 'message_attributes'
190
191
  # extracting original SNS message
191
192
  tmp_body = ::JSON.parse msg.body
193
+ self.logger.debug('[transport-snssqs] msg parsed from JSON')
192
194
  # if there is no Message, this isn't a SNS message and something has gone terribly wrong
193
- next if tmp_body.key? 'Message'
195
+ unless tmp_body.key? 'Message'
196
+ self.logger.info('[transport-snssqs] msg body without SNS Message received')
197
+ next
198
+ end
194
199
  # replacing the body with the SNS message (as it would be in a raw delivered SNS-SQS message)
195
200
  msg.body = tmp_body['Message']
196
201
  msg.message_attributes = {}
197
202
  # discarding messages without attributes, since this would lead to an exception in subscribe
198
- next if tmp_body.key? 'MessageAttributes'
203
+ unless tmp_body.key? 'MessageAttributes'
204
+ self.logger.info('[transport-snssqs] msg body without message attributes received')
205
+ next
206
+ end
199
207
  # parsing the message_attributes
200
208
  tmp_body['MessageAttributes'].each do |name, value|
201
209
  msg.message_attributes[name] = Aws::SQS::Types::MessageAttributeValue.new
@@ -203,6 +211,7 @@ module Sensu
203
211
  msg.message_attributes[name].data_type = 'String'
204
212
  end
205
213
  end
214
+ self.logger.debug('[transport-snssqs] msg parsed successfully')
206
215
  msg
207
216
  rescue ::JSON::JSONError => e
208
217
  self.logger.info(e)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-transport-snssqs-ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troy Ready
@@ -31,7 +31,7 @@ cert_chain:
31
31
  SDfvq2xI1v+iTmBkyYqft23MKnTcc5jJ5Gh0a11a2zUstWaH1XHelXYCx44ZLCtC
32
32
  Q6k=
33
33
  -----END CERTIFICATE-----
34
- date: 2017-05-23 00:00:00.000000000 Z
34
+ date: 2017-06-07 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: aws-sdk
metadata.gz.sig CHANGED
Binary file