-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: updating ProducerOptions to use QueueUrl hostname #102
feat: updating ProducerOptions to use QueueUrl hostname #102
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
@@ -5,6 +5,7 @@ export interface ProducerOptions { | |||
batchSize?: number; | |||
sqs?: SQSClient; | |||
region?: string; | |||
useQueueUrlAsEndpoint?: boolean; |
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.
I wonder if it's better just to extend SQS' native types here rather than implementing a new type every time they have a new option.
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.
It can be extended if it's ok to update @aws-sdk/client-sqs version to at least 3.507 where this functionality was added.
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.
In this way handler can be passed, that is not what we what from producer
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.
Sure, we can look at this comment separately, just a comment on future prosperity.
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.
Note to self: After merging I think that our types need some comments and documentation like we have for sqs-consumer.
Resolves #NUMBER
Description:
Add useQueueUrlAsEndpoint support in Producer initialization
Type of change:
Why is this change required?:
Let use QueueUrl hostname as the endpoint with @aws-sdk/client-sqs@^v3.507.0
Code changes:
Add useQueueUrlAsEndpoint to ProducerOptions, so it can be passed to SQSClient.
Add useQueueUrlAsEndpoint check in Producer constructor to pass true as default value.
Checklist: