Skip to content
Discussion options

You must be logged in to vote

For TCP with the default bytes decoder, the default framing is newline-delimited. Changing framing.method to bytes stops splitting on newlines, but it also means Vector waits for the connection to close before emitting the buffered data as one event.

The bytes framer does not have a max_length setting. To limit newline-delimited TCP messages, use:

sources:
  incoming:
    type: socket
    mode: tcp
    address: 0.0.0.0:9000
    decoding:
      codec: bytes
    framing:
      method: newline_delimited
      newline_delimited:
        max_length: 16384

Messages over that limit are discarded. For a persistent TCP connection carrying multiple messages, choose framing that matches the sender's…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pront
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
source:socket Anything `socket` source related domain:config Anything related to configuring Vector domain:codecs Anything related to Vector's codecs (encoding/decoding)
2 participants