Skip to content

Commit

Permalink
output: make it go zoom (#19)
Browse files Browse the repository at this point in the history
* output: make it go zoom

By declaring `concurrency :shared`, a single shared instance can be used by
pipeline workers _concurrently_ instead of the legacy sharing we get by default
that shares the instance _sequentially_.

* Update CHANGELOG.md
  • Loading branch information
yaauie committed Nov 16, 2023
1 parent 4870955 commit 466a299
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.0.1
- Fix: improves throughput by allowing pipeline workers to share a plugin instance _concurrently_ instead of _sequentially_ [#19](https://github.com/logstash-plugins/logstash-integration-logstash/pull/19)

## 1.0.0
- Introduces the load balancing mechanism to distribute the requests among the `hosts` [#16](https://github.com/logstash-plugins/logstash-integration-logstash/pull/16)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
3 changes: 3 additions & 0 deletions lib/logstash/outputs/logstash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
require "stud/interval" # Stud::stoppable_sleep

class LogStash::Outputs::Logstash < LogStash::Outputs::Base

concurrency :shared

extend LogStash::PluginMixins::ValidatorSupport::RequiredHostOptionalPortValidationAdapter

include LogStash::PluginMixins::HttpClient[:with_deprecated => false]
Expand Down
1 change: 1 addition & 0 deletions spec/unit/logstash_output_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
it { is_expected.to be_a_kind_of Class }
it { is_expected.to be <= LogStash::Outputs::Base }
it { is_expected.to have_attributes(:config_name => "logstash") }
it { is_expected.to have_attributes(:concurrency => :shared) }
end

describe "a plugin instance with minimal config" do
Expand Down

0 comments on commit 466a299

Please sign in to comment.