GPrabhudas commented on a change in pull request #560:
URL: https://github.com/apache/pulsar-client-go/pull/560#discussion_r667630829
##########
File path: pulsar/internal/batch_builder.go
##########
@@ -128,24 +137,56 @@ func newBatchContainer(
bc.msgMetadata.Compression = &compressionType
}
+ for _, opt := range options {
+ opt(&bc)
+ }
+
return bc
}
// NewBatchBuilder init batch builder and return BatchBuilder pointer. Build a
new batch message container.
func NewBatchBuilder(
maxMessages uint, maxBatchSize uint, producerName string, producerID
uint64,
compressionType pb.CompressionType, level compression.Level,
- bufferPool BuffersPool, logger log.Logger,
+ bufferPool BuffersPool, logger log.Logger, options
...func(*batchContainer),
) (BatchBuilder, error) {
bc := newBatchContainer(
maxMessages, maxBatchSize, producerName, producerID,
compressionType,
- level, bufferPool, logger,
+ level, bufferPool, logger, options...,
)
return &bc, nil
}
+// UseEncryptionKeys encryption key names to use
Review comment:
Got it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]