diff --git a/CHANGELOG.md b/CHANGELOG.md index ff1a64b..a0bd968 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,22 @@ +## 3.1.0 + - breaking,config: Remove deprecated config `queue`. Please use `key` and `data_type`. + - breaking,config: Remove deprecated config `name`. + ## 3.0.1 - - Republish all the gems under jruby. + - Republish all the gems under jruby. + ## 3.0.0 - - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141 -# 2.0.5 - - Fix LocalJumpError exception see https://github.com/logstash-plugins/logstash-output-redis/pull/27 -# 2.0.4 - - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash -# 2.0.3 - - New dependency requirements for logstash-core for the 5.0 release + - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141 + +## 2.0.5 + - Fix LocalJumpError exception see https://github.com/logstash-plugins/logstash-output-redis/pull/27 + +## 2.0.4 + - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash + +## 2.0.3 + - New dependency requirements for logstash-core for the 5.0 release + ## 2.0.0 - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully, instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895 diff --git a/lib/logstash/outputs/redis.rb b/lib/logstash/outputs/redis.rb index 78cf6d6..7c958f6 100644 --- a/lib/logstash/outputs/redis.rb +++ b/lib/logstash/outputs/redis.rb @@ -20,10 +20,6 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base default :codec, "json" - # Name is used for logging in case there are multiple instances. - config :name, :validate => :string, :default => 'default', - :deprecated => true - # The hostname(s) of your Redis server(s). Ports may be specified on any # hostname, which will override the global port config. # @@ -49,17 +45,13 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base # Password to authenticate with. There is no authentication by default. config :password, :validate => :password - # The name of the Redis queue (we'll use RPUSH on this). Dynamic names are - # valid here, for example `logstash-%{type}` - config :queue, :validate => :string, :deprecated => true - # The name of a Redis list or channel. Dynamic names are # valid here, for example `logstash-%{type}`. - config :key, :validate => :string, :required => false + config :key, :validate => :string, :required => true # Either list or channel. If `redis_type` is list, then we will set # RPUSH to key. If `redis_type` is channel, then we will PUBLISH to `key`. - config :data_type, :validate => [ "list", "channel" ], :required => false + config :data_type, :validate => [ "list", "channel" ], :required => true # Set to true if you want Redis to batch up values and send 1 RPUSH command # instead of one command per value to push on the list. Note that this only @@ -96,25 +88,6 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base def register require 'redis' - # TODO remove after setting key and data_type to true - if @queue - if @key or @data_type - raise RuntimeError.new( - "Cannot specify queue parameter and key or data_type" - ) - end - @key = @queue - @data_type = 'list' - end - - if not @key or not @data_type - raise RuntimeError.new( - "Must define queue, or key and data_type parameters" - ) - end - # end TODO - - if @batch if @data_type != "list" raise RuntimeError.new( @@ -222,7 +195,7 @@ def connect # A string used to identify a Redis instance in log messages def identity - @name || "redis://#{@password}@#{@current_host}:#{@current_port}/#{@db} #{@data_type}:#{@key}" + "redis://#{@password}@#{@current_host}:#{@current_port}/#{@db} #{@data_type}:#{@key}" end def send_to_redis(event, payload) diff --git a/logstash-output-redis.gemspec b/logstash-output-redis.gemspec index 332dfa1..81d19e9 100644 --- a/logstash-output-redis.gemspec +++ b/logstash-output-redis.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'logstash-output-redis' - s.version = '3.0.1' + s.version = '3.1.0' s.licenses = ['Apache License (2.0)'] s.summary = "This output will send events to a Redis queue using RPUSH" s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"