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: produce request for mesh-filter #17818

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

adamkotwasinski
Copy link
Contributor

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

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #17818 was opened by adamkotwasinski.

see: more, trace.

Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
// 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) {
Copy link
Contributor Author

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

@adamkotwasinski adamkotwasinski marked this pull request as ready for review August 24, 2021 20:34
// 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.
Copy link
Contributor Author

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

@mattklein123 mattklein123 merged commit a8f6fec into envoyproxy:main Aug 25, 2021
@adamkotwasinski adamkotwasinski deleted the kafka-mesh-produce branch August 25, 2021 05:10
mpuncel added a commit to mpuncel/envoy that referenced this pull request Aug 25, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants