-
Notifications
You must be signed in to change notification settings - Fork 56
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
Qos2 idempotent producer #733
Qos2 idempotent producer #733
Conversation
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.
The cyclomatic complexity of the code has gone up quite a bit with these proposed changes.
MqttKafkaSessionFactory
MqttSessionProxy
-> KafkaOffsetFetchStream
-> KafkaInitProducerStream
-> KafkaOffsetCommitStream
-> MqttKafkaPublishFactory.MqttPublishProxy
-> MqttKafkaPublishFactory.KafkaProxy
-> MqttKafkaPublishFactory.KafkaMessagesProxy
-> MqttKafkaPublishFactory.KafkaRetainedProxy
MqttKafkaPublishFactory
MqttPublishProxy
-> MqttKafkaSessionFactory.MqttSessionProxy
In general, we don't want to reach across stream factories for behavior, even doing so for state should be kept to a minimum.
In this case, we had discussed a minor change to have session handle offset commit instead of publish, but this change seems to have more inter-stream behavioral dependencies than that.
Perhaps we should have a discussion about it to determine how best to simplify if possible.
.../main/java/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/MqttKafkaConfiguration.java
Outdated
Show resolved
Hide resolved
...va/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/MqttKafkaPublishFactory.java
Outdated
Show resolved
Hide resolved
...va/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/MqttKafkaSessionFactory.java
Outdated
Show resolved
Hide resolved
...va/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/MqttKafkaSessionFactory.java
Outdated
Show resolved
Hide resolved
return new String16FW(BitUtil.toHex(offsetMetadata.buffer().byteArray(), | ||
offsetMetadata.offset(), offsetMetadata.limit())); |
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.
We'll want to optimize this at some point to avoid allocation during qos2 ack.
...va/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/MqttKafkaPublishFactory.java
Outdated
Show resolved
Hide resolved
...va/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/MqttKafkaSessionFactory.java
Outdated
Show resolved
Hide resolved
...va/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/MqttKafkaSessionFactory.java
Outdated
Show resolved
Hide resolved
...va/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/MqttKafkaSessionFactory.java
Outdated
Show resolved
Hide resolved
...java/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/PublishClientMetadata.java
Outdated
Show resolved
Hide resolved
...java/io/aklivity/zilla/runtime/binding/mqtt/kafka/internal/stream/PublishClientMetadata.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/aklivity/zilla/runtime/binding/mqtt/internal/stream/MqttServerFactory.java
Outdated
Show resolved
Hide resolved
specs/binding-mqtt.spec/src/main/resources/META-INF/zilla/mqtt.idl
Outdated
Show resolved
Hide resolved
.../src/main/java/io/aklivity/zilla/runtime/binding/mqtt/internal/stream/MqttServerFactory.java
Show resolved
Hide resolved
...t.spec/src/test/java/io/aklivity/zilla/specs/binding/mqtt/streams/application/PublishIT.java
Outdated
Show resolved
Hide resolved
...t.spec/src/test/java/io/aklivity/zilla/specs/binding/mqtt/streams/application/PublishIT.java
Outdated
Show resolved
Hide resolved
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.
Looks better!
No description provided.