lib/fluent/plugin/in_mqtt.rb in fluent-plugin-mqtt-io-0.2.0 vs lib/fluent/plugin/in_mqtt.rb in fluent-plugin-mqtt-io-0.2.1

- old
+ new

@@ -1,11 +1,11 @@ module Fluent class MqttInput < Input Plugin.register_input('mqtt', self) config_param :port, :integer, :default => 1883 - config_param :bind, :string, :default => '127.0.0.1' + config_param :host, :string, :default => '127.0.0.1' config_param :topic, :string, :default => '#' config_param :format, :string, :default => 'json' config_param :bulk_trans, :bool, :default => true config_param :bulk_trans_sep, :string, :default => "\t" config_param :username, :string, :default => nil @@ -23,11 +23,11 @@ define_method("router") { Fluent::Engine } end def configure(conf) super - @bind ||= conf['bind'] + @host ||= conf['host'] @topic ||= conf['topic'] @bulk_trans ||= conf['bulk_trans'] @bulk_trans_sep ||= conf['bulk_trans_sep'] @port ||= conf['port'] @username ||= conf['username'] @@ -57,12 +57,12 @@ sleep @retry_interval increment_retry_interval end def start - $log.debug "start mqtt #{@bind}" + $log.debug "start mqtt #{@host}" opts = { - host: @bind, + host: @host, port: @port, username: @username, password: @password, keep_alive: @keep_alive }