Skip to content

Add delimiter parameter of in_tcp#640

Merged
kenhys merged 2 commits into
fluent:1.0from
Watson1978:docs-in-tcp-delimiter
Jul 24, 2026
Merged

Add delimiter parameter of in_tcp#640
kenhys merged 2 commits into
fluent:1.0from
Watson1978:docs-in-tcp-delimiter

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

The parameter is defined at lib/fluent/plugin/in_tcp.rb:45-46

desc 'The payload is read up to this character.'
config_param :delimiter, :string, default: "\n"

but input/tcp.md only mentioned it in a comment of the example configuration, with no section under "Parameters".

It is matched with String#index (in_tcp.rb:127), not as a pattern, so a multi-character delimiter works; this was verified by sending '{"k":"a"}||{"k":"b"}||' with delimiter "||".

The interaction with message_length_limit follows in_tcp.rb:153-162, where the buffer is cleared and discard_till_next_delimiter is set.

The parameter was introduced at fluent/fluentd#368

@Watson1978
Watson1978 requested a review from kenhys July 23, 2026 03:03
Comment thread input/tcp.md Outdated
@Watson1978
Watson1978 force-pushed the docs-in-tcp-delimiter branch from 8a0d75f to 2d31a23 Compare July 24, 2026 01:02
Watson1978 and others added 2 commits July 24, 2026 10:02
The parameter is defined at lib/fluent/plugin/in_tcp.rb:45-46

    desc 'The payload is read up to this character.'
    config_param :delimiter, :string, default: "\n"

but input/tcp.md only mentioned it in a comment of the example
configuration, with no section under "Parameters".

It is matched with String#index (in_tcp.rb:127), not as a pattern, so a
multi-character delimiter works; this was verified by sending
'{"k":"a"}||{"k":"b"}||' with `delimiter "||"`.

The interaction with message_length_limit follows in_tcp.rb:153-162, where
the buffer is cleared and `discard_till_next_delimiter` is set.

The parameter was introduced at fluent/fluentd#368

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Co-authored-by: Kentaro Hayashi <kenhys@gmail.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978
Watson1978 force-pushed the docs-in-tcp-delimiter branch from 2d31a23 to b392028 Compare July 24, 2026 01:02
@Watson1978
Watson1978 requested a review from kenhys July 24, 2026 01:02
@kenhys
kenhys merged commit 913f4ad into fluent:1.0 Jul 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants