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

make sqs config more configurable #838

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jpassaro
Copy link

No description provided.

.builder()
.queueUrl(queueUrl)
.maxNumberOfMessages(fetchMessageCount)
Option(messageAttributeNames).filter(_.nonEmpty).map(_.asJava).fold(blder)(blder.messageAttributeNames(_))
Copy link
Member

Choose a reason for hiding this comment

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

this looks fishy

Copy link
Author

Choose a reason for hiding this comment

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

does this look any better?

      Option(messageAttributeNames)
        .filter(_.nonEmpty)
        .fold(blder)(names => blder.messageAttributeNames(names.asJava))

or

     if (messageAttributeNames.nonEmpty)
       blder.messageAttributeNames(messageAttributeNames)
     else blder

@jpassaro jpassaro force-pushed the enable-configurable-sqs-receive-stream branch from 22e9ca7 to 080754d Compare March 28, 2022 17:24
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.

2 participants