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 MV multiple consumers 1 thread details #62

Merged
merged 4 commits into from
Dec 11, 2023
Merged

Conversation

lesandie
Copy link
Contributor

@lesandie lesandie commented Dec 4, 2023

Explain more in detail how kafka_thread_per_consumer = 0 and kafka_num_consumers = 1
works

@lesandie lesandie self-assigned this Dec 4, 2023

So the basic pipeline is depicted in the schema.

![basic pipeline](https://camo.githubusercontent.com/2c746ce7620b882e8ce7b186d3fc7fdddb853f85c53d7ef1eeac06dd382ace6c/687474703a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d317a4c57496a4964636b6c6a3838476d716e424d464f4a70726d74336a58336f57)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error Fetching Resource

2022.11.09 17:49:34.282077 [ 2385 ] {} <Debug> StorageKafka (kafka_destination): Started streaming to 2 attached views
2022.11.09 17:49:34.282778 [ 73593 ] {} <Debug> StorageKafka (kafka_destination): [rdk:CGRPOP] [thrd:main]: Group "test-group-2022-11-08" received op GET_SUBSCRIPTION in state wait-broker-transport (join-state init)
2022.11.09 17:49:34.333031 [ 2385 ] {} <Warning> StorageKafka (kafka_destination): Can't get assignment. Will keep trying.
2022.11.09 17:49:34.333598 [ 73593 ] {} <Debug> StorageKafka (kafka_destination): [rdk:CGRPOP] [thrd:main]: Group "test-group-2022-11-08" received op GET_ASSIGNMENT in state wait-broker-transport (join-state init)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange fragment of logs: it has errors. Not related to the article subject.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes put them there to show how streams were 'seen' in logs but after your explanation it does not make sense, also warnings are because of offline broker probably. I'll remove them.

These streams are not threads so this is how it works:

* ClickHouse will create a INSERT AST for streaming the data.
* Create two streams and join them in a union stream. Only insert into dependent views and expect that input blocks contain virtual columns
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. 1 stream is one consumer. No matter how many MVs you have

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking your diagrams I'll use them and update explanation. Thanks a lot!. 🙇🏼

@lesandie lesandie merged commit 2457efa into main Dec 11, 2023
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants