atezs82 commented on a change in pull request #14: URL: https://github.com/apache/pulsar-adapters/pull/14#discussion_r657769442
########## File path: pulsar-spark/src/main/java/org/apache/pulsar/spark/SparkStreamingPulsarReceiver.java ########## @@ -43,34 +46,52 @@ private static final Logger LOG = LoggerFactory.getLogger(SparkStreamingPulsarReceiver.class); private String serviceUrl; - private ConsumerConfigurationData<byte[]> conf; + private Map<String,Object> clientConfig; + private ConsumerConfigurationData<byte[]> consumerConfig; private Authentication authentication; private PulsarClient pulsarClient; private Consumer<byte[]> consumer; public SparkStreamingPulsarReceiver( String serviceUrl, - ConsumerConfigurationData<byte[]> conf, + ConsumerConfigurationData<byte[]> consumerConfig, Authentication authentication) { - this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, conf, authentication); + this(StorageLevel.MEMORY_AND_DISK_2(), serviceUrl, new HashMap<>(), consumerConfig, authentication); + } + + public SparkStreamingPulsarReceiver( Review comment: The idea behind adding 2 new constructors to the 2 existing ones is I wanted to allow users of the interface to be able to configure Pulsar clients regardless whether they want to specify a storage level or leave it to default. Also, I wanted to keep previous constructors as well to keep backward compatibility. Please let me know what do you think about this. -- 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