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 sink can insert messages out-of-order #7277

Open
jszwedko opened this issue Apr 29, 2021 · 2 comments
Open

kafka sink can insert messages out-of-order #7277

jszwedko opened this issue Apr 29, 2021 · 2 comments
Labels
sink: kafka Anything `kafka` sink related type: bug A code related bug.

Comments

@jszwedko
Copy link
Member

The kafka sink is implemented in such a way that messages could be sent to Kafka out-of-order. See:

https://github.com/timberio/vector/blob/29736f34150da640175dae4aeb4ff8638cd1c441/src/sinks/kafka.rs#L302-L324

Here we queue up a bunch of futures that are themselves inserting into Kafka. Depending on the ordering that those futures are resolved in, we could theoretically end up queueing up the inserts in rdkafka out-of-order. Notably, when the message is queued in rdkafka via send_result it will be sent in-order so I think we just need to move the send_result call out of the future that is being queued up for later resolution.

@jszwedko jszwedko added type: bug A code related bug. sink: kafka Anything `kafka` sink related labels Apr 29, 2021
@zamazan4ik
Copy link
Contributor

@jszwedko Is it still an issue for the current Vector version?

@jszwedko
Copy link
Member Author

@jszwedko Is it still an issue for the current Vector version?

I believe so, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sink: kafka Anything `kafka` sink related type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants