Skip to content
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

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

levys17
Copy link
Contributor

@levys17 levys17 commented Feb 29, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

  • Implemented the method doNotSendTypeHeader() in AbstractMessagingMessageConverter to simplify the way to not send type information in messages sent with SqsTemplate.

💡 Motivation and Context

Issue related: #659

💚 How did you test it?

Updated unit test shouldSendAndReceiveRecordMessageWithoutPayloadInfoHeader in SqsTemplateIntegrationTests with this new implementation instead of old one.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated reference documentation to reflect the change
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions github-actions bot added the component: sqs SQS integration related issue label Feb 29, 2024
Copy link
Contributor

@tomazfernandes tomazfernandes left a 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!

@tomazfernandes
Copy link
Contributor

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.

@levys17
Copy link
Contributor Author

levys17 commented Mar 11, 2024

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?
image

@tomazfernandes
Copy link
Contributor

Hey, @tomazfernandes ! Do you think it's ok?

Hey @levys17! That's about it, but please commit the text to the PR so it's easier to review if you can.

@github-actions github-actions bot added the type: documentation Documentation or Samples related issue label Mar 12, 2024
Copy link
Contributor

@tomazfernandes tomazfernandes left a 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.

@levys17
Copy link
Contributor Author

levys17 commented Mar 13, 2024

Hey, @tomazfernandes ! Thanks for the review! Can you check again?

@levys17
Copy link
Contributor Author

levys17 commented Mar 14, 2024

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())
Copy link
Contributor

@tomazfernandes tomazfernandes Mar 15, 2024

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?

Copy link
Contributor

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!

Copy link
Contributor Author

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 😅

@maciejwalkowiak maciejwalkowiak added this to the 3.1.1 milestone Mar 15, 2024
@maciejwalkowiak maciejwalkowiak merged commit 3643a9b into awspring:main Mar 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: sqs SQS integration related issue type: documentation Documentation or Samples related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants