Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NATS bench with specified payloads #1288

Open
Zambito1 opened this issue Mar 5, 2025 · 2 comments
Open

NATS bench with specified payloads #1288

Zambito1 opened this issue Mar 5, 2025 · 2 comments
Assignees
Labels
proposal Enhancement idea or proposal

Comments

@Zambito1
Copy link
Contributor

Zambito1 commented Mar 5, 2025

Proposed change

--payload="./file_input" and -H/--header="K:V" arguments for bench subcommands that publish messages, like:

nats bench pub --payload="./file_input" -H "foo:bar"
nats bench js pub --payload="./file_input" -H "foo:bar"
nats bench service request --payload="./file_input" -H "foo:bar"

And maybe others

Use case

Right now the nats bench subcommand mostly seems useful for benchmarking NATS itself. This change would extend it to be more useful for benchmarking applications built on NATS.

Contribution

I would be willing to implement this

@Zambito1 Zambito1 added the proposal Enhancement idea or proposal label Mar 5, 2025
@Zambito1
Copy link
Contributor Author

It would likely be better to do <subject> [<body>] with --force-stdin instead of --payload to be consistent with nats pub and nats req.

@jnmoyne
Copy link
Contributor

jnmoyne commented Mar 11, 2025

Actually --payload is better than --force-stdin as the nats bench command doesn't expect a payload as a command argument (like the pub and req commands do).

see #1295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Enhancement idea or proposal
Projects
None yet
Development

No branches or pull requests

2 participants