-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: produce request for mesh-filter #17818
kafka: produce request for mesh-filter #17818
Conversation
9475061
to
0ab3c55
Compare
0ab3c55
to
5eab981
Compare
Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
5eab981
to
b315a0b
Compare
// Find a record that matches provided delivery confirmation coming from Kafka producer. | ||
// If all the records got their delivery data filled in, we are done, and can notify the origin | ||
// filter. | ||
bool ProduceRequestHolder::accept(const DeliveryMemento& memento) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[future]
this method gets invoked thru future RichKafkaProducer implementation going thru the dispatcher to handle librdkafka delivery confirmation
TLDR: librdkafka callback (dedicated thread) ~> dispatcher ~> RichKafkaProducer (envoy worker thread) -> PRH::accept
// We use this to tell apart messages. | ||
// Important: we do not free this memory, it's still part of the 'ProduceRequestHandler' object. | ||
// Future work: adopt Kafka's opaque-pointer functionality so we use less memory instead of | ||
// keeping whole payload until we receive a confirmation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[future work] we'd be sending with this and getting back the same pointer in callback's argument
* main: config: fix dfp config validation (envoyproxy#17835) docs: updating where meetings are uploaded (envoyproxy#17832) h2: moving a comment (envoyproxy#17846) quiche: early fail listener config with both quic and connection_balencer (envoyproxy#17834) dns: configuring a basic key value store to persist to disk (envoyproxy#17745) quic: fix receiving STOP_SENDING (envoyproxy#17815) tooling: Add Github release manager (envoyproxy#17741) tooling: Use upstream pytest-patches (envoyproxy#17809) Remove `hidden_envoy_deprecated_use_http2` (envoyproxy#17805) kafka: produce request for mesh-filter (envoyproxy#17818) Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Commit Message: kafka: produce request for mesh-filter
Additional Description: add produce handler for mesh filter; produce handler needs to extract records out of produce requests' bytes, send the records upstream (using Kafka producer), and will wait until it gets notifications (
onDelivery
) to finally find out that the processing has finished, and we can notify the filter (== send the response to downstream Kafka client).Risk Level: Low
Testing: unit tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A