Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka engine Polled batch of 0 messages #4529

Closed
simPod opened this issue Feb 28, 2019 · 3 comments
Closed

Kafka engine Polled batch of 0 messages #4529

simPod opened this issue Feb 28, 2019 · 3 comments
Labels
comp-kafka Kafka Engine question Question?

Comments

@simPod
Copy link
Contributor

simPod commented Feb 28, 2019

I have created a new Kafka engine, however when queried it doesn't fetch any messages

CREATE TABLE test_consumer (
    forDateTime UInt32,
    valueIn     String,
    valueOut    String,
    id2  Nullable(String)
)
    ENGINE = Kafka SETTINGS
        kafka_broker_list = 'kafka-1.domain.eu:9092,kafka-2.domain.eu:9092,kafka-3.domain.eu:9092',
        kafka_topic_list = 'my_topic',
        kafka_group_name = 'clickhouse.test.group1',
        kafka_format = 'JSONEachRow',
        kafka_row_delimiter = '\n',
        kafka_num_consumers = 3;
2019.02.28 00:59:18.739977 [ 304 ] {54a59bea-ed0a-4525-9820-c66be024fcc3} <Trace> StorageKafka (test_consumer): Setting brokers: kafka-1.domain.eu:9092,kafka-2.domain.eu:9092,kafka-3.domain.eu:9092
2019.02.28 00:59:18.740025 [ 304 ] {54a59bea-ed0a-4525-9820-c66be024fcc3} <Trace> StorageKafka (test_consumer): Setting Group ID: clickhouse.test.group1 Client ID: clickhouse
2019.02.28 00:59:18.740657 [ 304 ] {54a59bea-ed0a-4525-9820-c66be024fcc3} <Trace> StorageKafka (test_consumer): Setting brokers: kafka-1.domain.eu:9092,kafka-2.domain.eu:9092,kafka-3.domain.eu:9092
2019.02.28 00:59:18.740673 [ 304 ] {54a59bea-ed0a-4525-9820-c66be024fcc3} <Trace> StorageKafka (test_consumer): Setting Group ID: clickhouse.test.group1 Client ID: clickhouse
2019.02.28 00:59:18.741090 [ 304 ] {54a59bea-ed0a-4525-9820-c66be024fcc3} <Trace> StorageKafka (test_consumer): Setting brokers: kafka-1.domain.eu:9092,kafka-2.domain.eu:9092,kafka-3.domain.eu:9092
2019.02.28 00:59:18.741104 [ 304 ] {54a59bea-ed0a-4525-9820-c66be024fcc3} <Trace> StorageKafka (test_consumer): Setting Group ID: clickhouse.test.group1 Client ID: clickhouse
2019.02.28 00:59:28.071398 [ 111 ] {e1c5f859-c001-4ccd-b092-7ea43c43877e} <Debug> StorageKafka (test_consumer): Starting reading 1 streams
   Kafka
2019.02.28 00:59:28.571783 [ 111 ] {e1c5f859-c001-4ccd-b092-7ea43c43877e} <Trace> StorageKafka (test_consumer): Polled batch of 0 messages
2019.02.28 00:59:29.072022 [ 111 ] {e1c5f859-c001-4ccd-b092-7ea43c43877e} <Trace> StorageKafka (test_consumer): Polled batch of 0 messages
2019.02.28 00:59:29.572192 [ 111 ] {e1c5f859-c001-4ccd-b092-7ea43c43877e} <Trace> StorageKafka (test_consumer): Polled batch of 0 messages
2019.02.28 00:59:30.072391 [ 111 ] {e1c5f859-c001-4ccd-b092-7ea43c43877e} <Trace> StorageKafka (test_consumer): Polled batch of 0 messages
2019.02.28 00:59:30.572589 [ 111 ] {e1c5f859-c001-4ccd-b092-7ea43c43877e} <Trace> StorageKafka (test_consumer): Polled batch of 0 messages

I don't see anything else helpful in log.

I can see new messages flowing to the topic but clickhouse doesn't consume anything 🤔 What might be the reason?

@simPod simPod added the question Question? label Feb 28, 2019
@josepowera
Copy link

josepowera commented Feb 28, 2019

Check if it is related to #4442

@simPod
Copy link
Contributor Author

simPod commented Feb 28, 2019

I have not encountered such error yet. Only that "Polled batch of 0 messages"

@simPod
Copy link
Contributor Author

simPod commented Feb 28, 2019

And yes, I have found in error log, that I have incorrect column types. Defined. Then I saw

2019.02.28 11:17:20.473187 [ 777 ] {578bc0ef-be9f-4cf8-90e2-0fb1e4b95081} HTTPHandler: Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected { before: \0: (at row 2)

But adding kafka_row_delimiter = '\n', helped. Thanks

@simPod simPod closed this as completed Feb 28, 2019
@filimonov filimonov added the comp-kafka Kafka Engine label May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-kafka Kafka Engine question Question?
Projects
None yet
Development

No branches or pull requests

3 participants