-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Simplify not adding type header in SqsTemplate sent messages (#659) #1066
Simplify not adding type header in SqsTemplate sent messages (#659) #1066
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.
Hey @levys17, implementation looks good!
Can you please add this option to the documentation and include a unit test?
Thanks!
Oh, sorry, nevermind about the test, now I see we already had one. So if you can just add it to the docs please - let me know if you need any help with that. |
Hey, @tomazfernandes ! Do you think it's ok? |
...src/main/java/io/awspring/cloud/sqs/support/converter/AbstractMessagingMessageConverter.java
Outdated
Show resolved
Hide resolved
Hey @levys17! That's about it, but please commit the text to the PR so it's easier to review if you can. |
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.
Hey @levys17, thanks for the changes, we're almost there.
Left a couple of comments.
...src/main/java/io/awspring/cloud/sqs/support/converter/AbstractMessagingMessageConverter.java
Outdated
Show resolved
Hide resolved
Hey, @tomazfernandes ! Thanks for the review! Can you check again? |
Done! @tomazfernandes |
@@ -305,7 +305,7 @@ void shouldSendAndReceiveBatchFifo() { | |||
@Test | |||
void shouldSendAndReceiveRecordMessageWithoutPayloadInfoHeader() { | |||
SqsTemplate template = SqsTemplate.builder().sqsAsyncClient(this.asyncClient) | |||
.configureDefaultConverter(converter -> converter.setPayloadTypeHeaderValueFunction(msg -> null)) | |||
.configureDefaultConverter(converter -> converter.doNotSendTypeHeader()) |
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.
Something seems off here - shouldn't this be converter.doNotSendPayloadTypeHeader()
?
What am I missing?
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.
Yup, CI broke. @levys17, if you can please fix the test. 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.
Srry! I forgot to add the test class while commiting 😅
📢 Type of change
📜 Description
doNotSendTypeHeader()
inAbstractMessagingMessageConverter
to simplify the way to not send type information in messages sent withSqsTemplate
.💡 Motivation and Context
Issue related: #659
💚 How did you test it?
Updated unit test
shouldSendAndReceiveRecordMessageWithoutPayloadInfoHeader
inSqsTemplateIntegrationTests
with this new implementation instead of old one.📝 Checklist
🔮 Next steps