srkukarni commented on a change in pull request #1885: allow users to specify
message timeout for functions
URL: https://github.com/apache/incubator-pulsar/pull/1885#discussion_r192450480
##########
File path:
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
##########
@@ -60,12 +61,15 @@ public void open(Map<String, Object> config) throws
Exception {
setupSerDe();
// Setup pulsar consumer
- this.inputConsumer = this.pulsarClient.newConsumer()
+ ConsumerBuilder<byte[]> consumerBuilder =
this.pulsarClient.newConsumer()
.topics(new
ArrayList<>(this.pulsarSourceConfig.getTopicSerdeClassNameMap().keySet()))
.subscriptionName(this.pulsarSourceConfig.getSubscriptionName())
-
.subscriptionType(this.pulsarSourceConfig.getSubscriptionType().get())
- .ackTimeout(1, TimeUnit.MINUTES)
- .subscribe();
+
.subscriptionType(this.pulsarSourceConfig.getSubscriptionType().get());
+
+ if (pulsarSourceConfig.getTimeoutMs() != null) {
Review comment:
what if timeout is null
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services