File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
api/integrations/event/sqs Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ SQS_ACCESS_KEY_ID=
166166SQS_SECRET_ACCESS_KEY=
167167SQS_ACCOUNT_ID=
168168SQS_REGION=
169+ SQS_BASE_URL=
169170SQS_MAX_PAYLOAD_SIZE=1048576
170171
171172# ===========================================
Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ export class SqsController extends EventController implements EventControllerInt
126126 ? 'singlequeue'
127127 : `${ event . replace ( '.' , '_' ) . toLowerCase ( ) } ` ;
128128 const queueName = `${ prefixName } _${ eventFormatted } .fifo` ;
129- const sqsUrl = `https://sqs.${ sqsConfig . REGION } .amazonaws.com/${ sqsConfig . ACCOUNT_ID } /${ queueName } ` ;
129+ const rawBaseUrl = sqsConfig . BASE_URL || `https://sqs.${ sqsConfig . REGION } .amazonaws.com` ;
130+ const baseUrl = rawBaseUrl . replace ( / \/ + $ / , '' ) ;
131+ const sqsUrl = `${ baseUrl } /${ sqsConfig . ACCOUNT_ID } /${ queueName } ` ;
130132
131133 const message = {
132134 ...( extra ?? { } ) ,
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ export type Sqs = {
122122 SECRET_ACCESS_KEY : string ;
123123 ACCOUNT_ID : string ;
124124 REGION : string ;
125+ BASE_URL : string ;
125126 MAX_PAYLOAD_SIZE : number ;
126127 EVENTS : {
127128 APPLICATION_STARTUP : boolean ;
@@ -593,6 +594,7 @@ export class ConfigService {
593594 SECRET_ACCESS_KEY : process . env . SQS_SECRET_ACCESS_KEY || '' ,
594595 ACCOUNT_ID : process . env . SQS_ACCOUNT_ID || '' ,
595596 REGION : process . env . SQS_REGION || '' ,
597+ BASE_URL : process . env . SQS_BASE_URL || '' ,
596598 MAX_PAYLOAD_SIZE : Number . parseInt ( process . env . SQS_MAX_PAYLOAD_SIZE ?? '1048576' ) ,
597599 EVENTS : {
598600 APPLICATION_STARTUP : process . env ?. SQS_GLOBAL_APPLICATION_STARTUP === 'true' ,
You can’t perform that action at this time.
0 commit comments