rdhabalia commented on a change in pull request #1276: Refactored 
ClientConfuguration to use ClientConfigurationData shared with ClientBuilderImpl
URL: https://github.com/apache/incubator-pulsar/pull/1276#discussion_r170382654
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/api/ProducerConfiguration.java
 ##########
 @@ -21,69 +21,44 @@
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import java.io.Serializable;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 import 
org.apache.pulsar.client.api.PulsarClientException.ProducerBusyException;
-import org.apache.pulsar.common.util.collections.ConcurrentOpenHashSet;
+import org.apache.pulsar.client.impl.conf.ProducerConfigurationData;
 
-import com.google.common.base.Objects;
+import lombok.EqualsAndHashCode;
 
 /**
  * Producer's configuration
  *
  * @deprecated use {@link PulsarClient#newProducer()} to construct and 
configure a {@link Producer} instance
  */
 @Deprecated
+@EqualsAndHashCode
 public class ProducerConfiguration implements Serializable {
 
     private static final long serialVersionUID = 1L;
-    private String producerName = null;
-    private long sendTimeoutMs = 30000;
-    private boolean blockIfQueueFull = false;
-    private int maxPendingMessages = 1000;
-    private int maxPendingMessagesAcrossPartitions = 50000;
-    private MessageRoutingMode messageRouteMode = 
MessageRoutingMode.SinglePartition;
-    private HashingScheme hashingScheme = HashingScheme.JavaStringHash;
-    @JsonIgnore
-    private MessageRouter customMessageRouter = null;
-    private long batchingMaxPublishDelayMs = 10;
-    private int batchingMaxMessages = 1000;
-    private boolean batchingEnabled = false; // disabled by default
-
-    @JsonIgnore
-    private CryptoKeyReader cryptoKeyReader;
-    @JsonIgnore
-    private ConcurrentOpenHashSet<String> encryptionKeys;
-
-    private CompressionType compressionType = CompressionType.NONE;
-
-    // Cannot use Optional<Long> since it's not serializable
-    private Long initialSequenceId = null;
-
-    private final Map<String, String> properties = new HashMap<>();
+
+    private final ProducerConfigurationData conf = new 
ProducerConfigurationData();
 
     public enum MessageRoutingMode {
         SinglePartition, RoundRobinPartition, CustomPartition
     }
 
     public enum HashingScheme {
-        JavaStringHash,
-        Murmur3_32Hash
+        JavaStringHash, Murmur3_32Hash
 
 Review comment:
   is there any reason why can't we reuse 
`org.apache.pulsar.client.api.HashingScheme` instead creating sub-enum?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Reply via email to