-
Notifications
You must be signed in to change notification settings - Fork 5
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
Introduce debug exporter to stream records out of a broker #289
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npepinpe
force-pushed
the
np-debug-exporter
branch
from
May 25, 2022 12:21
3ece542
to
7f5d745
Compare
npepinpe
force-pushed
the
np-debug-exporter
branch
from
May 25, 2022 14:48
74928da
to
6596bc0
Compare
…ort anything else
4 tasks
npepinpe
force-pushed
the
np-debug-exporter
branch
from
May 25, 2022 15:40
1091f44
to
34f3692
Compare
npepinpe
force-pushed
the
np-debug-exporter
branch
from
May 25, 2022 15:43
ae019a2
to
9e760a0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a new
DebugExporter
and its pairedDebugReceiver
to stream records out of a broker. The exporter is focused on correctness and simplicity, not performance.As mentioned, it's made of two components, an exporter and a receiver. The receiver is an HTTP 1.1 server with a single endpoint,
POST /records
. The endpoint expects a list of records (for forwards-compatibility), all of which it assumes come from the same partition. It will then answer with a 200 and the highest known acknowledged position for that partition in the form of{ "position": long }
, or simply a 204 and no body if there is no known acknowledged position.The exporter will export each record as a single POST. This is inefficient, but extremely simple and accurate, as any failure immediately causes the record to be retried.
At the moment, the exporter is dynamically packaged as a standalone JAR and copied over to the container on demand. The alternative was packaging it separately and adding it to the resources, which is less than ideal (and also makes testing flakier, i.e. did you rebuild the JAR for the exporter based tests?). I will anyway propose to move the exporter to the Zeebe project itself, so I hope we can simply get rid of this limitation in the future.
Due to this, however, it means any work on the exporter should be done carefully. The class must remain standalone, and any custom types it requires must be inner classes (to simplify packaging logic).
Pull Request Checklist
mvn clean install -DskipTests
locally before committing