GitHub user haze518 added a comment to the discussion: Support sending messages 
in the background

It seems to me that having a single producer, configured either for background 
or synchronous sending, is sufficient. The user is expected to decide on the 
intended usage at the moment of creation — and if both modes are needed, they 
can simply create an additional producer.

This approach is actually quite close to what I originally proposed here: 
https://github.com/apache/iggy/discussions/1593#discussioncomment-12389851 — 
just without introducing separate methods. Personally, I still believe it would 
be more convenient if we explicitly split them into async/sync producers (e.g. 
via separate constructors or builder modes), as that would reduce cognitive 
load. We already have a fair number of configuration options, and this kind of 
clarity might help — though I understand we previously decided against that 
approach.

But since opinions vary, let's vote:
👍 — Keep a single `send_messages` method, use config flags (e.g. 
`background_send`)
🎉 — Add a second method like `send_in_background`
👀 — I don't have a strong opinion

GitHub link: 
https://github.com/apache/iggy/discussions/1593#discussioncomment-13125256

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to