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
Updated serializer configuration and made them lazy #280
Conversation
This is expected to be a whole or part of the fix for AxonFramework/AxonFramework#2184 |
...amework/extensions/kafka/eventhandling/consumer/streamable/StreamableKafkaMessageSource.java
Show resolved
Hide resolved
...ava/org/axonframework/extensions/kafka/autoconfig/KafkaAutoConfigurationIntegrationTest.java
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.
There still some complains from sonar, looks like adding @SuppressWarnings("squid:S1874")
is the only valid fix for the parametrized types. Not sure there is a good fix for the duplicated code. Guess we could have some helper function, for example to get a default supplier? https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&sinceLeakPeriod=true&pullRequest=280&id=AxonFramework_extension-kafka
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 good now, thanks 👍
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.
Missing a little bit of JavaDoc. Otherwise, this is good to go if you ask me.
...amework/extensions/kafka/eventhandling/consumer/streamable/StreamableKafkaMessageSource.java
Outdated
Show resolved
Hide resolved
...ork/extensions/kafka/eventhandling/consumer/subscribable/SubscribableKafkaMessageSource.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/axonframework/extensions/kafka/eventhandling/producer/KafkaPublisher.java
Outdated
Show resolved
Hide resolved
Keeps it consistent with the framework and gives us a chance to notify the user they are using a default serializer and they shouldn't
SonarCloud Quality Gate failed. |
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.
Still think this looks fine.
The goal for this PR is to do the same we did on Framework, making Serializers lazy and only initializing them if the user doesn't provide one.
It has an added benefit of not always initializing XStream.
For making it work, the initialization of the
messageConverter
was also pushed to the end of the builder call.I am not sure we have meaningful tests to be added in this case.