Skip to content

Conversation

sebastiandusza
Copy link

@sebastiandusza sebastiandusza commented Sep 2, 2021

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

I think there is a bug in SimpleMessageListenerContainer.MessageGroupExecutor class.
When multiple messages from the same message group are recieved and exception is thrown while
processing one them the others should not be processed. I think this is importand because
the order should be maintained even in case of an error.

💡 Motivation and Context

I think it solves this issue
#124

💚 How did you test it?

I integrated it with my app that is using SQS FIFO queue and checked if order is maintained in case of an exception.
Also I prepared a unit test.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • I updated reference documentation to reflect the change
  • No breaking changes <- not sure about that.

🔮 Next steps

}
catch (MessagingException messagingException) {
applyDeletionPolicyOnError(receiptHandle);
break;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this break should be executed only when this.deletionPolicy == ON_SUCCESS ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @sebastiandusza

I missed your pull request, and opened another with the same implementation.
Take a look what I implemented about this question.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fernandomoraes, cool :-)

I posted a small comment. Please consider if it makes sense.

@maciejwalkowiak
Copy link
Contributor

Thanks @sebastiandusza and apologies for late review. I am closing this as #192 is already in place and it has a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants