Class: Fluent::Plugin::AzureEventHubsOutputBuffered
- Inherits:
-
BufferedOutput
- Object
- BufferedOutput
- Fluent::Plugin::AzureEventHubsOutputBuffered
- Defined in:
- lib/fluent/plugin/out_azureeventhubs_buffered.rb
Constant Summary collapse
- DEFAULT_BUFFER_TYPE =
"memory"
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #format(tag, time, record) ⇒ Object
- #formatted_to_msgpack_binary? ⇒ Boolean
-
#initialize ⇒ AzureEventHubsOutputBuffered
constructor
A new instance of AzureEventHubsOutputBuffered.
- #multi_workers_ready? ⇒ Boolean
- #prefer_buffered_processing ⇒ Object
- #shutdown ⇒ Object
- #start ⇒ Object
- #write(chunk) ⇒ Object
Constructor Details
#initialize ⇒ AzureEventHubsOutputBuffered
Returns a new instance of AzureEventHubsOutputBuffered.
30 31 32 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 30 def initialize super end |
Instance Method Details
#configure(conf) ⇒ Object
46 47 48 49 50 51 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 46 def configure(conf) compat_parameters_convert(conf, :buffer, :inject) super require_relative 'azureeventhubs/http' @sender = AzureEventHubsHttpSender.new(@connection_string, @hub_name, @expiry_interval,@proxy_addr,@proxy_port,@open_timeout,@read_timeout) end |
#format(tag, time, record) ⇒ Object
53 54 55 56 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 53 def format(tag, time, record) record = inject_values_to_record(tag, time, record) [tag, time, record].to_msgpack end |
#formatted_to_msgpack_binary? ⇒ Boolean
58 59 60 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 58 def formatted_to_msgpack_binary? true end |
#multi_workers_ready? ⇒ Boolean
62 63 64 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 62 def multi_workers_ready? true end |
#prefer_buffered_processing ⇒ Object
42 43 44 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 42 def prefer_buffered_processing true end |
#shutdown ⇒ Object
38 39 40 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 38 def shutdown super end |
#start ⇒ Object
34 35 36 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 34 def start super end |
#write(chunk) ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/fluent/plugin/out_azureeventhubs_buffered.rb', line 66 def write(chunk) records = [] chunk.msgpack_each { |tag, time, record| records.push(record) } records.each_slice(@max_batch_size).each { |group| @sender.send_w_properties(group, @message_properties) } end |