fluent-plugin-nsq 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/fluent/plugin/in_nsq.rb +5 -2
  2. metadata +1 -1
@@ -6,6 +6,7 @@ module Fluent
6
6
 
7
7
  config_param :topic, :string, default: nil
8
8
  config_param :channel, :string, default: 'fluent_nsq_input'
9
+ config_param :in_flight, :integer, default: 100
9
10
  config_param :nsqlookupd, :string, default: nil
10
11
  config_param :tag, :string, default: '_key'
11
12
  config_param :time_key, :string, default: nil
@@ -34,6 +35,7 @@ module Fluent
34
35
  fail ConfigError, 'Missing nsqlookupd' unless @nsqlookupd
35
36
  fail ConfigError, 'Missing topic' unless @topic
36
37
  fail ConfigError, 'Missing channel' unless @channel
38
+ fail ConfigError, 'in_flight needs to be bigger than 0' unless @in_flight > 0
37
39
  end
38
40
 
39
41
  def start
@@ -42,7 +44,8 @@ module Fluent
42
44
  @consumer = Nsq::Consumer.new(
43
45
  nsqlookupd: lookupds,
44
46
  topic: @topic,
45
- channel: @channel
47
+ channel: @channel,
48
+ max_in_flight: @in_flight
46
49
  )
47
50
  @running = true
48
51
  @thread = Thread.new(&method(:consume))
@@ -88,7 +91,7 @@ module Fluent
88
91
  if @time_key
89
92
  record[@time_key]
90
93
  else
91
- msg.timestamp
94
+ msg.timestamp.to_i
92
95
  end
93
96
  end
94
97
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-nsq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: