sonots / fluent-plugin-reemit

Fluentd plugin to re-emit messages avoiding infinity match loop to achieve branching of data flow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: undefined method "emit_events"

RyanMcDonald opened this issue · comments

I'm getting the following error with fluent-plugin-reemit 0.3.1 and Fluent 0.14.21:

2017-09-14 12:07:55 -0700 [warn]: #0 emit transaction failed: error_class=NoMethodError error="undefined method `emit_events' for #<Fluent::Plugin::RecordTransformerFilter:007ff27559c9e0>" tag="test"
  2017-09-14 12:07:55 -0700 [warn]: #0 /Users/ryan/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/fluent-plugin-reemit-0.3.1/lib/fluent/plugin/out_reemit.rb:120:in `emit_stream'
  2017-09-14 12:07:55 -0700 [warn]: #0 /Users/ryan/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/fluent-plugin-reemit-0.3.1/lib/fluent/plugin/out_reemit.rb:33:in `emit'

I was able to get the error with this minimal config. It seems to happen if you have any filter directive after the reemit.

<match **>
  @type copy
  <store>
    @type stdout
  </store>
  <store>
    @type reemit
  </store>
</match>

<filter **>
  @type stdout
</filter>

In this case I used @type stdout instead of record_transformer, which got this error:

2017-09-14 12:39:25 -0700 [warn]: #0 emit transaction failed: error_class=NoMethodError error="undefined method `emit_events' for #<Fluent::Plugin::StdoutFilter:007fbcfa48b818>" tag="test"
  2017-09-14 12:39:25 -0700 [warn]: #0 /Users/ryan/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/fluent-plugin-reemit-0.3.1/lib/fluent/plugin/out_reemit.rb:120:in `emit_stream'

Thanks! When I created this plugin (fluentd 0.10), filter plugin mechanism did not exist, and I was not supposed to use with it. We need to fix to support filter plugins.

0.3.2 is released.