Skip to content

fake: --listen unix:DIR, and --control takes a port - #87

Merged
twmb merged 2 commits into
masterfrom
fake-listen-control
Sep 25, 2026
Merged

twmb merged 2 commits into
masterfrom
fake-listen-control

Conversation

@twmb

@twmb twmb commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Two kcl fake flag changes.

  • --listen unix:DIR serves each broker on a Unix socket, DIR/<port>.sock,
    instead of TCP. Brokers still advertise 127.0.0.1:<port>, so a client
    reaches the socket through its own dialer (in franz-go, kgo.Dialer). A
    Unix socket avoids the TCP stack on loopback, which helps when benchmarking a
    client. A socket path over the OS limit (103 bytes on macOS) now reports its
    length instead of a bare "invalid argument".
  • --control now takes only a port and listens on 127.0.0.1, like the brokers
    and the schema registry. A bare --control still uses 9099.

Changelog

  • kcl fake --listen unix:DIR serves brokers on Unix sockets.
  • behavior change kcl fake --control takes a port rather than an address,
    and always listens on 127.0.0.1.

--control now takes only a port and listens on 127.0.0.1, like the
brokers and the schema registry. A bare --control still uses 9099.
--listen unix:DIR serves each broker on a Unix socket, DIR/<port>.sock,
instead of TCP. Brokers still advertise 127.0.0.1:<port>, so a client
reaches the socket through its own dialer. A Unix socket avoids the TCP
stack on loopback, which helps when benchmarking a client.

A socket path over the OS limit (103 bytes on macOS) fails with a bare
"invalid argument"; we add the path length to that error.
@twmb
twmb merged commit 5290cb0 into master Sep 25, 2026
1 check passed
@twmb
twmb deleted the fake-listen-control branch September 25, 2026 04:16
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.

1 participant