Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
ItalyPaleAle 2023-01-20 23:20:58 +00:00
parent 4aeb055ac0
commit ab7f9aa509
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ func (aeh *AzureEventHubs) BulkPublish(ctx context.Context, req *pubsub.BulkPubl
// Batch options
batchOpts := &azeventhubs.EventDataBatchOptions{}
if val := req.Metadata[contribMetadata.MaxBulkPubBytesKey]; val != "" {
maxBytes, err := strconv.ParseUint(val, 10, 63)
var maxBytes uint64
maxBytes, err = strconv.ParseUint(val, 10, 63)
if err == nil && maxBytes > 0 {
batchOpts.MaxBytes = maxBytes
}