Repository navigation
kafka_sink on kafka-out, certified; the kcat sink joins the Kerberos route (ADR-0044 step 5) - #120
Merged
Merged
Conversation
…route The kafka_sink recipe becomes a manifest on kafka-out (ADR-0044, step 5), certified through admission against the 4.4.0 helper broker with SCRAM, as kafka_source is: its broker.sh makes the topic, and its dataflow.sh sends one bus message with a key and an id, then reads the record back from the topic and checks the key, the value and Vejas-Emit-Id. The helper gains a consume command. The recipe's EXCEPTION.md goes. The kcat sink moves to docs/examples/kafka-kerberos, with Kerberos flags, partitioner=murmur2_random so that a key lands where the Java client and kafka-out put it, and kcat-sink.sh in front of kcat. kcat -P writes one record for each line of its input, and nothing for an empty input, and exits 0 either way: the driver would ack a body of two lines as two records, and an empty body with no record. The guard refuses both, says why, and exits 2. e2e/kafka.sh phase 11 runs the example's command as written, on the plaintext listener, and checks both refusals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
…built The catalog keeps one Kafka row, source and sink on the runtime's own client, and no kcat recipe. The exec bridges page gains the kcat sink of the Kerberos route: what its guard refuses and why, the partitioner, and the SCRAM login that Ubuntu's kcat 1.7.1 with librdkafka 2.3.0 failed against Apache Kafka 4.4.0 where kafka-in and kafka-out passed. ADR-0044's status says steps 1 to 5 are built and step 6 is open. One CHANGELOG entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
kafka-out shares kafka-in's connection settings, so its refusal of SASL_MECHANISM = GSSAPI said a Kerberos cluster is read through kcat, one partition per manifest. It now says read and written, and names the examples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
This file contains hidden or 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
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.
ADR-0044 step 5: the
kafka_sinkrecipe onkafka-out, certified through admission, and the kcat sink moved to the Kerberos route.The recipe
kafka_sink.vjs.exampleis a manifest onkafka-out: SCRAM-SHA-256 over TLS, the same settings askafka_source.overrides.jsonpoints it at the admission's 4.4.0 helper broker (SASL_PLAINTEXT, thevejastest user).broker.shstarts the helper and makesorders.enrichedwith 3 partitions.kafka-outmakes no topic.dataflow.shpublishes one bus message withVejas-KeyandNats-Msg-Id. It reads the record back from the topic and checks the key, the value andVejas-Emit-Id.e2e/admission/brokers/kafka.shgets aconsume <port> <topic> <n>command, the console consumer with headers and key. Only the last n lines are kept, because the tool printed a notice on stdout before the record. That notice made the first local run fail.EXCEPTION.mdgoes.The kcat sink of the Kerberos route
docs/examples/kafka-kerberos/kafka_orders_out.vjs.exampleuses the GSSAPI flags of the source example. It adds two things.-X partitioner=murmur2_random. I checked by hand with Ubuntu's kcat 1.7.1 and librdkafka 2.3.0 against 4.4.0: 13 keys on a topic of 7 partitions. With the flag, 0 keys were off the Java client's partition. With librdkafka's default partitioner, 12 were off.A small guard,
kcat-sink.sh, because two cases lost data in silence when I tested them by hand:kcat -Pa\nbexec-sinkacks on exit 0, so the first two would be acked wrong. The guard refuses both, puts the reason on stderr, which the runtime logs with the nak, and exits 2. The message is delivered again, then becomes a dead letter. Any other body goes to kcat unchanged: I checked NUL and CR bytes. Likekcat-source.sh, the scriptexecs kcat, so no shell waits on it.The SCRAM finding, only as far as I verified it.
kafka_source(kafka-in) andkafka_sink(kafka-out) were admitted.The example and the exec bridges page say to use
kafka-outfor SCRAM.e2e/kafka.shphase 11. It takes the example'sCMDline from the file and swaps the Kerberos flags for the plaintext listener. The rewrite fails if the example no longer has the expected form. Then:kafka-outgave it, and keeps its header.Docs
kafka_sinkstays on kcat untilkafka-out" from the unreleasedkafka_sourceentry.Verified locally
run.shon the debug binary:kafka_sinkandkafka_sourcewere both admitted.e2e/kafka.shwith the debug build:vjs-checkof the Kerberos sink example: ok.Left out
🤖 Generated with Claude Code
https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT