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

About the Golang stream client #322

Open
Gsantomaggio opened this issue Oct 24, 2024 · 4 comments
Open

About the Golang stream client #322

Gsantomaggio opened this issue Oct 24, 2024 · 4 comments

Comments

@Gsantomaggio
Copy link

Gsantomaggio commented Oct 24, 2024

Hi Anton,
About the Golang streaming client, here, you used the default settings.

Default settings are more throughput-oriented; the client aggregates the messages and sends them every 100 milliseconds by default.
or when the Batch-Size is reached.

You could reduce the timing with

producer, err := env.NewProducer(streamName,stream.NewProducerOptions().SetBatchPublishingDelay(10))

or reduce the batchSize with stream.NewProducerOptions().SetBatchSize(50)

There is also another API, BatchSend, where the aggregation part is up to the user. The API is synchronous.

Please read:
https://github.com/rabbitmq/rabbitmq-stream-go-client?tab=readme-ov-file#send-vs-batchsend

and also: https://groups.google.com/g/rabbitmq-users/c/IO_9-BbCzgQ

I hope this helps :)!

@antonputra
Copy link
Owner

thanks, @Gsantomaggio. kafka is a complicated system with a bunch of settings that you can tune and optimize either for latency or throughput, but i appreciate your help. i'll see if i can make any adjustments for the next benchmark between kafka and nats

@Gsantomaggio
Copy link
Author

well, actually, I was speaking about the RabbitMQ Golang client :)

@antonputra
Copy link
Owner

@Gsantomaggio sorry about that, i usually dive deeper only when i'm working on a specific benchmark

@Gsantomaggio
Copy link
Author

No problem. I need to include some information on this issue. My fault

That's the benchmark: https://www.youtube.com/watch?v=UPkOsXKG4ns

btw don't worry.

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

No branches or pull requests

2 participants