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

Suggestion regarding kafka keys #31

Closed
cameronbraid opened this issue Sep 10, 2020 · 5 comments · Fixed by #39
Closed

Suggestion regarding kafka keys #31

cameronbraid opened this issue Sep 10, 2020 · 5 comments · Fixed by #39
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@cameronbraid
Copy link

Kafka only guarantees ordering of messages within a kafka partition - this is determined by the message key.

Currently the exporter uses a RecordID as they Kafka key.

This RecodID includes the zeebe partition and offset values therefore the kafka key is different for every message produced to kafka.

Therefore the 'ordering within a partition' that zeebe emits is not guaranteed for kafka consumers.

So, to fix this, the kafka message key should be changed to be the zeebe partiton id only.

@cameronbraid cameronbraid changed the title Question regarding kafka keys Suggestion regarding kafka keys Sep 10, 2020
@npepinpe npepinpe self-assigned this Sep 10, 2020
@tjwp
Copy link
Contributor

tjwp commented Sep 10, 2020

I raised a similar question here: #29

A downside to using the Zeebe partition id as the message key with Kafka is that it limits the number of Kafka partitions that can be used. Also, I think there is a greater chance of the partitions being unbalanced since certain activity only goes to Zeebe node 1.

@cameronbraid
Copy link
Author

cameronbraid commented Sep 10, 2020

Sure, though I would rather have unbalanced partitions, but with correct ordering

@cameronbraid
Copy link
Author

However using workflowInstanceKey should provide the same ordering guarantees for all workflow instance related records.. And will spread the data out over more kafka partitions.. so that sounds like a good idea

The other record types would be much lower volumes of data and should probably have keys chosen based on their individual ordering requirements

@cameronbraid
Copy link
Author

One other thing to consider for ordering is the ordering is only guaranteed within a topic. The default configuration for kafka-exporter uses a different topic per value type

@npepinpe
Copy link
Collaborator

That's the sample config - by default, if you don't configure anything at all, then all records are sent to the zeebe topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants