diff --git a/lib/fluent/plugin/in_udp.rb b/lib/fluent/plugin/in_udp.rb index c2d436115f..e16c412c07 100644 --- a/lib/fluent/plugin/in_udp.rb +++ b/lib/fluent/plugin/in_udp.rb @@ -43,10 +43,15 @@ class UdpInput < Input desc "Remove newline from the end of incoming payload" config_param :remove_newline, :bool, default: true desc "The max size of socket receive buffer. SO_RCVBUF" - config_param :receive_buffer_size, :size, default: nil + config_param :receive_buffer_size, :size, default: nil, deprecated: "use receive_buffer_size in transport section instead." config_param :blocking_timeout, :time, default: 0.5 + # overwrite server plugin to change default to :udp and remove tcp/tls protocol from list + config_section :transport, required: false, multi: false, init: true, param_name: :transport_config do + config_argument :protocol, :enum, list: [:udp], default: :udp + end + def configure(conf) compat_parameters_convert(conf, :parser) parser_config = conf.elements('parse').first