carnivore-rabbitmq 0.1.2-java → 0.1.4-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1cb8fa37ab6817a590000e1c64bb4bf37f2fc8cf
4
+ data.tar.gz: 93d1a0c9bf2d79420b0d71c344f32f062a332600
5
+ SHA512:
6
+ metadata.gz: 8f02603cde4b661db6f8ee7be21b1cd72e23d58933c672d4d13cad889d69f653332b7cc9d34b9c58749807c01868a00fa9de515988e74ca8a3279d6da2e7c08a
7
+ data.tar.gz: be787120790270dddea4f8a8c3167ad2a540861bd3b26995b3f03e3f5c3945849dfccb5cac48c06e8669f51759aac456cca8c1466e481f545a70ca6b638fa528
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.1.4
2
+ * Move routing key set prior to queue setup
3
+ * Add `:publish_to` option to allow publish to exchange instead of queue
4
+
1
5
  # v0.1.2
2
6
  * Include option to provide routing key
3
7
  * Only start message collection if source is receiving
@@ -100,11 +100,11 @@ module Carnivore
100
100
  abort ArgumentError.new("No valid connection arguments defined (:bunny or :march_hare must be defined)")
101
101
  end
102
102
  connection.start
103
+ @routing_key = args[:routing_key]
103
104
  @channel = connection.create_channel
104
105
  @exchange = channel.topic(args[:exchange])
105
106
  @queue = channel.queue(args[:queue], :auto_delete => false).
106
107
  bind(exchange, :routing_key => routing_key)
107
- @routing_key = args.fetch(:routing_key, '_default')
108
108
  @connection
109
109
  end
110
110
 
@@ -124,7 +124,11 @@ module Carnivore
124
124
  # @param payload [Object]
125
125
  def transmit(payload, *_)
126
126
  payload = MultiJson.dump(payload) unless payload.is_a?(String)
127
- queue.publish(payload, :routing_key => routing_key)
127
+ if(args[:publish_via].to_s == 'exchange')
128
+ exchange.publish(payload, :routing_key => routing_key)
129
+ else
130
+ queue.publish(payload, :routing_key => routing_key)
131
+ end
128
132
  end
129
133
 
130
134
  # Confirm message processing
@@ -1,9 +1,6 @@
1
1
  module Carnivore
2
2
  module Rabbitmq
3
- # Custom version class
4
- class Version < Gem::Version
5
- end
6
3
  # Current version of library
7
- VERSION = Version.new('0.1.2')
4
+ VERSION = Gem::Version.new('0.1.4')
8
5
  end
9
6
  end
metadata CHANGED
@@ -1,62 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnivore-rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: java
7
6
  authors:
8
7
  - Chris Roberts
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-11 00:00:00.000000000 Z
11
+ date: 2015-01-31 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: carnivore
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.1.8
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.1.8
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bunny
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: march_hare
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  description: Carnivore RabbitMQ source
@@ -65,38 +58,37 @@ executables: []
65
58
  extensions: []
66
59
  extra_rdoc_files: []
67
60
  files:
68
- - lib/carnivore-rabbitmq/version.rb
69
- - lib/carnivore-rabbitmq/message_collector.rb
70
- - lib/carnivore-rabbitmq/rabbitmq.rb
71
- - lib/carnivore-rabbitmq.rb
72
- - README.md
73
61
  - CHANGELOG.md
74
62
  - CONTRIBUTING.md
75
63
  - LICENSE
64
+ - README.md
65
+ - lib/carnivore-rabbitmq.rb
66
+ - lib/carnivore-rabbitmq/message_collector.rb
67
+ - lib/carnivore-rabbitmq/rabbitmq.rb
68
+ - lib/carnivore-rabbitmq/version.rb
76
69
  homepage: https://github.com/heavywater/carnivore-rabbitmq
77
70
  licenses:
78
71
  - Apache 2.0
72
+ metadata: {}
79
73
  post_install_message:
80
74
  rdoc_options: []
81
75
  require_paths:
82
76
  - lib
83
77
  required_ruby_version: !ruby/object:Gem::Requirement
84
- none: false
85
78
  requirements:
86
- - - ! '>='
79
+ - - ">="
87
80
  - !ruby/object:Gem::Version
88
81
  version: '0'
89
82
  required_rubygems_version: !ruby/object:Gem::Requirement
90
- none: false
91
83
  requirements:
92
- - - ! '>='
84
+ - - ">="
93
85
  - !ruby/object:Gem::Version
94
86
  version: '0'
95
87
  requirements: []
96
88
  rubyforge_project:
97
- rubygems_version: 1.8.24
89
+ rubygems_version: 2.2.2
98
90
  signing_key:
99
- specification_version: 3
91
+ specification_version: 4
100
92
  summary: Message processing source
101
93
  test_files: []
102
94
  has_rdoc: