logstash-output-azure_service_bus 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 016441e1bf597f2bdea94a9123cf4a5fb10541ee6181455bb070a623cd0d1b74
4
- data.tar.gz: 872320c9b33b392745ddd08781bbd3f6bb14516150808d9f79079ead73bd5fea
3
+ metadata.gz: af1daf5ab0f287bfe29993a09437eb840063c5195d5dc9c247985fae757a09bd
4
+ data.tar.gz: afb35cc44123159129fc63fe5fcb374c7cb77ac98137b3b2ae0e513e96b12f09
5
5
  SHA512:
6
- metadata.gz: a69069641020d293436f0a6b9bb633734b030fc16731a006ab54deabc5e42958fbcae23c13aa370c200b51fbb8af7fe7c47f98256a9bb051fbf07a7438cd724a
7
- data.tar.gz: 9ced162d4a22745c9507c2e38800f493a04f9cb938d63ba3fcde836d5d997f9774f3eeaa28caf7c38f4fb11c22a8f15a77ae8be73d54feecf5928bd778afa43c
6
+ metadata.gz: 3727d297acacbee56d2570ac67aca3e05bcc2f677b6ab5ab50c3acfa84aa721c683be70810fdcc26203124d615cbd99e6bb19fc5f1d68d3eccefd859e288d0e9
7
+ data.tar.gz: a72b4442be6118a0b933b2d3e9b6736a282e3024f32f00dd9bb4506b6096c02a824777ebe7535340d53eb9c152121b8e9bf2bf70c00d9d5b05b9ccb67307306e
data/README.md CHANGED
@@ -22,6 +22,22 @@ output {
22
22
  }
23
23
  }
24
24
  ```
25
+ There is one optional setting (`messageid_field`) which sets the Service Bus `MessageId` value to an existing, unique field. If this setting is not used, Service Bus will generate an id when the message is created. The value of the provided field _must_ be unique or Service Bus will reject the message. A sample config might look like:
26
+ ```
27
+ input { ... }
28
+ filter {
29
+ uuid {
30
+ target => "uuid"
31
+ }
32
+ }
33
+ output {
34
+ azure_service_bus {
35
+ service_bus_namespace => "service-bus-name"
36
+ service_bus_entity => "queue-or-topic-name"
37
+ messageid_field => "uuid"
38
+ }
39
+ }
40
+ ```
25
41
 
26
42
  ## Service Bus Configuration
27
43
  This plugin will retry sending messages if the Service Bus connection times out or returns a bad response. To avoid idempotence issues, you should enable duplicate detection on the destination queue or topic.
@@ -10,7 +10,7 @@ class LogStash::Outputs::AzureServiceBus < LogStash::Outputs::Base
10
10
 
11
11
  config :service_bus_namespace, :validate => :string, :required => true
12
12
  config :service_bus_entity, :validate => :string, :required => true
13
- config :uuid_field, :validate => :string
13
+ config :messageid_field, :validate => :string
14
14
 
15
15
  def register
16
16
  retry_options = {
@@ -49,10 +49,10 @@ class LogStash::Outputs::AzureServiceBus < LogStash::Outputs::Base
49
49
  def send_events(events)
50
50
  messages = []
51
51
  events.each do |event|
52
- if @uuid_field.nil?
52
+ if @messageid_field.nil?
53
53
  messages.append({ 'Body' => JSON.generate(event.to_hash), 'BrokerProperties' => { 'ContentType' => 'application/json' } })
54
54
  else
55
- messages.append({ 'Body' => JSON.generate(event.to_hash), 'BrokerProperties' => { 'ContentType' => 'application/json', 'MessageId' => event.get(@uuid_field) } })
55
+ messages.append({ 'Body' => JSON.generate(event.to_hash), 'BrokerProperties' => { 'ContentType' => 'application/json', 'MessageId' => event.get(@messageid_field) } })
56
56
  end
57
57
  end
58
58
  post_messages(messages)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-azure_service_bus'
3
- s.version = '0.2.0'
3
+ s.version = '0.2.1'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Send Logstash messages to Azure Service Bus.'
6
6
  s.homepage = 'https://github.com/gharryg/logstash-output-azure_service_bus'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-azure_service_bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harrison Golden