-
Notifications
You must be signed in to change notification settings - Fork 65
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
Support - Batching when producing #7
Comments
I was a bit surprised when I realized how batching is implemented.
I was expecting the server to unwrap the command and store each message by itself in BookKeeper, but they are actually stored as one and therefore also delivered to the reader/consumer as one message. This means that:
We have implemented support for reading and consuming batched messages (from version 0.6.0), but producing batched messages is currently on hold. |
Hey @blankensteiner happy new year to you! |
Hi @eaba |
Thanks for the response - just seeing this after posting a new issue! |
@RobertIndie We need to add these methods to IProducerBuilder /// <summary>
/// Set the maximum number of messages permitted in a batch. The default is 1000.
/// </summary>
IProducerBuilder BatchingMaxMessagesPerBatch(int maxMessagesPerBatch);
/// <summary>
/// Set the time period within which the messages sent will be batched. The default is 1 ms.
/// </summary>
IProducerBuilder BatchingMaxPublishDelay(TimeSpan maxPublishDelay);
/// <summary>
/// Control whether automatic batching of messages is enabled for the producer. The default is 'false'.
/// </summary>
IProducerBuilder BatchingEnabled(bool batchingEnabled); This will require us to add these properties to ProducerOptions /// <summary>
/// Set the maximum number of messages permitted in a batch. The default is 1000.
/// </summary>
public int BatchingMaxMessagesPerBatch { get; set; }
/// <summary>
/// Set the time period within which the messages sent will be batched. The default is 1 ms.
/// </summary>
public TimeSpan BatchingMaxPublishDelay { get; set; }
/// <summary>
/// Control whether automatic batching of messages is enabled for the producer. The default is 'false'.
/// </summary>
public bool BatchingEnabled { get; set; } |
@RobertIndie We need to get 'max_message_size' from 'CommandConnected' to ensure we don't create batches that are too big. |
Ok, I agree. |
As described here:
The text was updated successfully, but these errors were encountered: