fluent-plugin-zmq-pub 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ec861a539aa2a351e391fea9eb5a4eb3311ec29f
4
+ data.tar.gz: f12db55f7fa0065c81c8d5a9d7e4d099e9e02a1b
5
+ SHA512:
6
+ metadata.gz: cf89a93d71897e50c3a9ad673a8b196758a5534fa44ef50e6a01042ab1006029f06fba717632df5dd97b0180a6a0ba28823c4e70cbd2012e3287812acfc328c2
7
+ data.tar.gz: abb8c90c64be26738d58d3148f2e7392aff7549b4be13fd72bb19c64e2137c2e6ad24448bcc2a7888b9de31a708729e09ece6fbfc4c8ef9ba56b6471f8ec4f18
@@ -14,9 +14,9 @@ Gem::Specification.new do |gem|
14
14
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
15
  gem.name = "fluent-plugin-zmq-pub"
16
16
  gem.require_paths = ["lib"]
17
- gem.version = "0.0.4"
18
- gem.add_development_dependency "fluentd"
17
+ gem.version = "0.0.5"
18
+ gem.add_development_dependency "rake"
19
+ gem.add_development_dependency "test-unit", "~> 3.2.0"
19
20
  gem.add_runtime_dependency "fluentd"
20
- gem.add_development_dependency "ffi-rzmq"
21
21
  gem.add_runtime_dependency "ffi-rzmq"
22
22
  end
@@ -1,3 +1,5 @@
1
+ require 'fluent/input'
2
+
1
3
  module Fluent
2
4
 
3
5
  class ZmqSubInput < Fluent::Input
@@ -26,10 +28,10 @@ module Fluent
26
28
  end
27
29
 
28
30
  def shutdown
29
- super
30
31
  Thread.kill(@thread)
31
32
  @thread.join
32
33
  @context.terminate
34
+ super
33
35
  end
34
36
 
35
37
  def run
@@ -1,3 +1,5 @@
1
+ require 'fluent/output'
2
+
1
3
  module Fluent
2
4
  class Fluent::ZmqPubOutput < Fluent::BufferedOutput
3
5
  Fluent::Plugin.register_output('zmq_pub', self)
@@ -46,25 +48,25 @@ module Fluent
46
48
  records[pubkey_replaced] ||= []
47
49
  records[pubkey_replaced] << record
48
50
  else
49
- @mutex.synchronize {
51
+ @mutex.synchronize {
50
52
  @publisher.send_string(pubkey_replaced + " " + record.to_msgpack,ZMQ::DONTWAIT)
51
53
  }
52
54
  end
53
55
  }
54
56
  if @bulk_send
55
- @mutex.synchronize {
57
+ @mutex.synchronize {
56
58
  records.each{ |k,v|
57
59
  @publisher.send_string(k + " " + v.to_msgpack,ZMQ::DONTWAIT)
58
60
  }
59
61
  }
60
62
  end
61
-
63
+
62
64
  end
63
-
65
+
64
66
  def shutdown
65
- super
66
67
  @publisher.close
67
68
  @context.terminate
69
+ super
68
70
  end
69
71
 
70
72
  end
metadata CHANGED
@@ -1,72 +1,79 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-zmq-pub
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - OGIBAYASHI Hironori
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
-
13
- date: 2014-10-09 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: fluentd
11
+ date: 2017-07-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
17
21
  prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
21
24
  - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: test-unit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.2.0
24
34
  type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: fluentd
28
35
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.2.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: fluentd
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
32
45
  - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
35
48
  type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: ffi-rzmq
39
49
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
43
52
  - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
46
- type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
49
56
  name: ffi-rzmq
50
- prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
54
59
  - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
57
62
  type: :runtime
58
- version_requirements: *id004
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
59
69
  description: 0MQ publisher/subscriber plugin for fluentd
60
- email:
70
+ email:
61
71
  - ogibayashi@gmail.com
62
72
  executables: []
63
-
64
73
  extensions: []
65
-
66
74
  extra_rdoc_files: []
67
-
68
- files:
69
- - .gitignore
75
+ files:
76
+ - ".gitignore"
70
77
  - Gemfile
71
78
  - LICENSE
72
79
  - README.rdoc
@@ -77,34 +84,31 @@ files:
77
84
  - test/helper.rb
78
85
  - test/plugin/test_in_zmq_sub.rb
79
86
  - test/plugin/test_out_zeromq_pub.rb
80
- homepage: ""
81
- licenses:
87
+ homepage: ''
88
+ licenses:
82
89
  - Apache License, Version 2.0
90
+ metadata: {}
83
91
  post_install_message:
84
92
  rdoc_options: []
85
-
86
- require_paths:
93
+ require_paths:
87
94
  - lib
88
- required_ruby_version: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
91
97
  - - ">="
92
- - !ruby/object:Gem::Version
93
- version: "0"
94
- required_rubygems_version: !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
97
102
  - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "0"
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
100
105
  requirements: []
101
-
102
106
  rubyforge_project:
103
- rubygems_version: 1.8.25
107
+ rubygems_version: 2.6.11
104
108
  signing_key:
105
- specification_version: 3
109
+ specification_version: 4
106
110
  summary: 0MQ publisher/subscriber plugin for fluentd, use 0MQ v3.2 or greater version
107
- test_files:
111
+ test_files:
108
112
  - test/helper.rb
109
113
  - test/plugin/test_in_zmq_sub.rb
110
114
  - test/plugin/test_out_zeromq_pub.rb