Repository navigation
Conversation
…loses an MQTT stream Add the binding.mqtt.kafka.stream.failed event, emitted wherever a failed Kafka stream (session, will signal, meta, describe, offset fetch, offset commit, init producer id, produce, fetch) is turned into a reset or abort of the MQTT session, publish or subscribe stream. It carries the stream kind, the client id, the topic or group where known and whether the MQTT session reply had already begun, so a close that carries no reason to a v3.1.1 client is diagnosable. Refs #3308 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SiHVoVsdTvsCTRmsCKGSdD
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.
Description
Since #3104 a failed Kafka stream is forwarded to the MQTT side as a reset or abort. Those closes emit no event, so a v3.1.1 client that gets a plain close after CONNACK leaves nothing in the log.
This adds the
binding.mqtt.kafka.stream.failedevent (BINDING_MQTT_KAFKA_STREAM_FAILED). It is emitted where a Kafka stream failure closes an MQTT session, publish or subscribe stream, and it carries:Example:
The Kafka meta stream for topic (mqtt-messages) failed before MQTT client (client-1) was connected, the MQTT stream was closed.The event is only emitted when the MQTT stream is not already closed. A QoS 1 produce reset that is answered with a negative acknowledgement and leaves the MQTT stream open does not emit it. Only the Kafka abort and reset handlers are covered. Window-overflow aborts and the cleanup helpers are not.
The change is additive: one line at each existing reset or abort site.
onPartitionsAbortedandonPartitionsResetgain atopicparameter so the meta failure can name its topic.Tests (engine ITs in the existing IT classes, reusing the existing server-sent reset and abort scripts, each asserting the event through the test exporter config): session, meta, init producer, offset fetch, produce and fetch. They failed before the change with
event mismatch ... actual: ENGINE_STOPPED.Verified with
./mvnw clean installonspecs/binding-mqtt-kafka.spec(418 tests) and./mvnw clean verifyonruntime/binding-mqtt-kafka(105 unit tests, 249 ITs, checkstyle and jacoco).Refs #3308
Generated by Claude Code