You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/01/03 08:41:42 UTC
[GitHub] sijie opened a new issue #3293: [IO] [Kafka] Heartbeat must be set
lower than the session timeout
sijie opened a new issue #3293: [IO] [Kafka] Heartbeat must be set lower than the session timeout
URL: https://github.com/apache/pulsar/issues/3293
#### Expected behavior
Kafka source connector should be able to run when changing session timeout ms to be less than 10s
#### Actual behavior
localrun throws exception.
```
Exception in thread "Kafka Source Thread" org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:717)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:597)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:579)
at org.apache.pulsar.io.kafka.KafkaAbstractSource.lambda$start$0(KafkaAbstractSource.java:103)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Heartbeat must be set lower than the session timeout
at org.apache.kafka.clients.consumer.internals.Heartbeat.<init>(Heartbeat.java:35)
at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.<init>(AbstractCoordinator.java:135)
at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.<init>(ConsumerCoordinator.java:108)
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:676)
... 4 more
```
#### Steps to reproduce
1. Prepare a kafka yaml file and make sure `sessionTimeoutMs` to be less than 10s.
```
configs:
bootstrapServers: "127.0.0.1:9092"
groupId: "pulsarUTset"
topic: "test_kafka_topic"
fetchMinBytes: 1
autoCommitEnabled: "true"
autoCommitIntervalMs: 1000
sessionTimeoutMs: 3000
```
2. Start pulsar standalone
3. Localrun a Kafka source connector
```
bin/pulsar-admin source localrun --source-config-file kafka.yaml -t kafka --destination-topic-name dest_topic --name kafka_fn
```
#### System configuration
**Pulsar version**: any released version and master
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services