manageiq-messaging 0.1.2 → 0.1.3

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
- SHA1:
3
- metadata.gz: 271baef8a9ddb7bc61f23e2f6eff5e67fa586f21
4
- data.tar.gz: 12a723657dbe6afad1ac751e698e037e7134272e
2
+ SHA256:
3
+ metadata.gz: 8859fa0a68ffe54c38283145348077bcbc78e004636e38960cc0d2ff70923f7a
4
+ data.tar.gz: '088f6d9d2dc80e753b16a0bbdce58dc789aec1d5eada50c0aa3b74fd78109006'
5
5
  SHA512:
6
- metadata.gz: 0f30b6f908408fd22ffb24c1d241a08e1d1d7f9934e7f4c460b7eecd236b49ce817fd7122aa286a0c64a3043f5a200c3e61406dc48bf29ad8e5a337e5f102cf7
7
- data.tar.gz: ecd78e6976f3d76dcbecb65476a1b524c228feb9ffc3e1257cd4861d99b65f62a657b29a318354de44215b0acba204b7889a104a169a9528d81e99f3767d0f7a
6
+ metadata.gz: 457f22d4a96c0ec19a05cb2a0ebe3a9f665f62583d7337ede95ddf786e899b78dcd86173c219988d34ef8d4deafc188d8bcd184728e8362e4b66c772875370f5
7
+ data.tar.gz: b496df16b18b87754bf22107fe0d7f30a2dee767f6673cdd51330880ea290539967397b32f629cb4ff24fb24e428390ba9478cc0c2bbc359c404e0a5cd358976
@@ -1,9 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.6
5
4
  - 2.3.1
6
- - 2.4.2
5
+ - 2.4.5
7
6
  before_install: gem install bundler -v 1.13.0
8
7
  after_script: bundle exec codeclimate-test-reporter
9
8
  sudo: false
@@ -5,7 +5,7 @@ module ManageIQ
5
5
  require 'manageiq/messaging/common'
6
6
  include ManageIQ::Messaging::Common
7
7
 
8
- GROUP_FOR_QUEUE_MESSAGES = 'manageiq_messaging_queue_group'.freeze
8
+ GROUP_FOR_QUEUE_MESSAGES = 'manageiq_messaging_queue_group_'.freeze
9
9
 
10
10
  private
11
11
 
@@ -21,9 +21,11 @@ module ManageIQ
21
21
  @topic_consumer ||= kafka_client.consumer(:group_id => persist_ref)
22
22
  end
23
23
 
24
- def queue_consumer
24
+ def queue_consumer(topic)
25
25
  # all queue consumers join the same group so that each message can be processed by one and only one consumer
26
- @queue_consumer ||= kafka_client.consumer(:group_id => GROUP_FOR_QUEUE_MESSAGES)
26
+ @queue_consumer.try(:stop) unless @queue_topic == topic
27
+ @queue_topic = topic
28
+ @queue_consumer ||= kafka_client.consumer(:group_id => GROUP_FOR_QUEUE_MESSAGES + topic)
27
29
  end
28
30
 
29
31
  trap("TERM") do
@@ -21,7 +21,7 @@ module ManageIQ
21
21
  batch_options[:automatically_mark_as_processed] = auto_ack?(options)
22
22
  batch_options[:max_bytes] = options[:max_bytes] if options.key?(:max_bytes)
23
23
 
24
- consumer = queue_consumer
24
+ consumer = queue_consumer(topic)
25
25
  consumer.subscribe(topic)
26
26
  consumer.each_batch(batch_options) do |batch|
27
27
  logger.info("Batch message received: queue(#{topic})")
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module Messaging
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Authors
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2019-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  requirements: []
204
204
  rubyforge_project:
205
- rubygems_version: 2.5.1
205
+ rubygems_version: 2.7.6
206
206
  signing_key:
207
207
  specification_version: 4
208
208
  summary: Client library for ManageIQ components to exchange messages through its internal