You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/08/05 10:26:40 UTC

[GitHub] [pulsar-dotpulsar] blankensteiner commented on issue #7: Support - Batching when producing

blankensteiner commented on issue #7:
URL: https://github.com/apache/pulsar-dotpulsar/issues/7#issuecomment-669114390


   @RobertIndie We need to add these methods to IProducerBuilder
   
   ```csharp
   /// <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
   ```csharp
   /// <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; }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org