carnivore-rabbitmq 0.1.6-java → 0.1.8-java

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: bc2b946e15bd270b39f0638c1ea958bd00a59cb0
4
- data.tar.gz: 84d97f7d4b24cdba609b3c354d3b87e4d89de8f9
3
+ metadata.gz: d127681a171c54a31bee1d2e77f9228a47d23d13
4
+ data.tar.gz: f1c2f43b31d7529bc91608596d5a49c02f483965
5
5
  SHA512:
6
- metadata.gz: 2e8e3c85246ca55806c14ca1d22a05f69d005c861625bd4538e9652cabf049178ab2d90acb3880e706d4817dad92230b73f9e147fbda320d119f8373217467a4
7
- data.tar.gz: 3323c256bde263678988d8aa749217188c11a05d8c1e57a7d46ea41caf8a0fb1f40d176faf58964313ba803a8a6d4c54ffbddff6d4f720560f41996fd91f0828
6
+ metadata.gz: c87dc59fb74f30e53e56811b3c779abd2d135c55c93e8aafadfd1670a57cbf63f2462b1ddadac8d935ac6c6b6dc6af1aae10146ca24d743011be5d7862e5a9da
7
+ data.tar.gz: 82b8053a6c222b0230b3f19b9490d57ba0faf341bf36587978140b9a4c4d546ecdac3594cfba2224760b7240a950e8e1b737b49bddfbefd06dea3e28ca405209
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.1.8
2
+ * Include support for auto extraction
3
+ * Detect received payload correctly based on adapter
4
+
1
5
  # v0.1.6
2
6
  * Fix connection setup when using march_hare
3
7
 
@@ -30,15 +30,25 @@ module Carnivore
30
30
  # @return [TrueClass]
31
31
  def collect_messages
32
32
  queue.subscribe(:block => true, :ack => true) do |info, metadata, payload|
33
+ if(payload.nil?)
34
+ payload = metadata
35
+ metadata = {}
36
+ end
33
37
  begin
34
- payload = MultiJson.load(payload)
38
+ payload = MultiJson.load(payload).to_smash
35
39
  rescue MultiJson::ParseError
36
40
  warn 'Received payload not in JSON format. Failed to parse!'
37
41
  end
38
42
  debug "Message received: #{payload.inspect}"
39
43
  debug "Message info: #{info.inspect}"
40
44
  debug "Message metadata: #{metadata.inspect}"
41
- message_queue << {:info => info, :metadata => metadata, :payload => payload}
45
+ message_queue << Smash.new(
46
+ :raw => Smash.new(
47
+ :info => info,
48
+ :metadata => metadata
49
+ ),
50
+ :content => payload
51
+ )
42
52
  debug "Sending new messages signal to: #{notify} (current queue size: #{message_queue.size})"
43
53
  notify.signal(:new_messages)
44
54
  end
@@ -1,6 +1,6 @@
1
1
  module Carnivore
2
2
  module Rabbitmq
3
3
  # Current version of library
4
- VERSION = Gem::Version.new('0.1.6')
4
+ VERSION = Gem::Version.new('0.1.8')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnivore-rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: java
6
6
  authors:
7
7
  - Chris Roberts