cckellogg commented on a change in pull request #247:
URL: https://github.com/apache/pulsar-client-go/pull/247#discussion_r424806768



##########
File path: pulsar/consumer_partition.go
##########
@@ -875,6 +868,20 @@ func (pc *partitionConsumer) discardCorruptedMessage(msgID 
*pb.MessageIdData,
                })
 }
 
+func (pc *partitionConsumer) getCompressionProvider(compressionType 
pb.CompressionType) (
+       provider compression.Provider, ok bool) {
+       if pc.compressionProviders == nil {
+               pc.compressionProviders = 
map[pb.CompressionType]compression.Provider{

Review comment:
       Will each consumer each have their own reference to all compressions 
providers? If so why not just preallocate when the partition consumer is 
created?
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to