251024 streamline message encoding - #105
Merged
Merged
Conversation
zmstone
force-pushed
the
251024-stream-line-message-encoding
branch
from
October 30, 2025 17:28
523c5cc to
9b63243
Compare
zmstone
force-pushed
the
251024-stream-line-message-encoding
branch
from
October 30, 2025 18:21
9b63243 to
b141bf8
Compare
Move Kafka batch encoding to another process to streamline the work load. The wolff_producer process can be more responsive to handle publish calls and Kafka replies.
zmstone
force-pushed
the
251024-stream-line-message-encoding
branch
from
October 30, 2025 18:27
b141bf8 to
9ec0ae9
Compare
thalesmg
reviewed
Oct 30, 2025
| erlang:process_flag(trap_exit, true), | ||
| ok = set_process_label(ClientId, Topic, Partition), | ||
| {ok, St, {continue, do_init}}. | ||
| {ok, Sender} = wolff_sender:start_link(self(), ClientId, Topic, Partition), |
Contributor
There was a problem hiding this comment.
Since we rely a lot on this producer process not crashing/restarting to avoid losing queued data, doesn't this linking open up more opportunities to lose data? Maybe we should at least handle the exit signal from this process in a different manner than stop.
Contributor
Author
There was a problem hiding this comment.
the only reason for sender to exit is a crash, hence should link-exit owner.
Contributor
There was a problem hiding this comment.
exactly, maybe could restart the sender instead of losing the replayq?
Contributor
Author
There was a problem hiding this comment.
i mean, it's like the crash bug is in wolff_producer itself.
thalesmg
approved these changes
Oct 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a sender process to offload
wolff_producerprocess from encoding batches which may includingSo
wolff_producercan be more focused on taking send requests into replayq, and handling Kafka acknowledgements.Benchmarked with 4 KB Payload to a single partition. When calling
wolff:send2(call return once enqueued)