Skip to content

Commit 075bd54

Browse files
authored
feat: feat: Add useQueueUrlAsEndpoint to ConsumerOptions (#472)
1 parent bed4dc6 commit 075bd54

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/consumer.ts

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export class Consumer extends TypedEventEmitter {
8686
this.sqs =
8787
options.sqs ||
8888
new SQSClient({
89+
useQueueUrlAsEndpoint: options.useQueueUrlAsEndpoint ?? true,
8990
region: options.region || process.env.AWS_REGION || 'eu-west-1'
9091
});
9192
autoBind(this);

src/types.ts

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ export interface ConsumerOptions {
7676
* @defaultValue process.env.AWS_REGION || `eu-west-1`
7777
*/
7878
region?: string;
79+
/**
80+
* If false uses the QueueUrl hostname as the endpoint.
81+
* @defaultValue `true`
82+
*/
83+
useQueueUrlAsEndpoint?: boolean;
7984
/**
8085
* Time in ms to wait for `handleMessage` to process a message before timing out.
8186
*

0 commit comments

Comments
 (0)