Allow endpoint to be configured for sqs event publisher
Signed-off-by: Scott Guymer <scott.guymer@philips.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-events-backend-module-aws-sqs': minor
|
||||
---
|
||||
|
||||
Allow endpoint configuration for sqs, enabling use of localstack for testing.
|
||||
+5
-1
@@ -68,7 +68,11 @@ export class AwsSqsConsumingEventPublisher implements EventPublisher {
|
||||
VisibilityTimeout: config.visibilityTimeout?.as('seconds'),
|
||||
WaitTimeSeconds: config.pollingWaitTime.as('seconds'),
|
||||
};
|
||||
this.sqs = new SQSClient({ region: config.region });
|
||||
|
||||
this.sqs = new SQSClient({
|
||||
region: config.region,
|
||||
endpoint: config.endpoint,
|
||||
});
|
||||
this.queueUrl = config.queueUrl;
|
||||
|
||||
this.taskTimeoutSeconds = config.timeout.as('seconds');
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface AwsSqsEventSourceConfig {
|
||||
topic: string;
|
||||
visibilityTimeout?: Duration;
|
||||
waitTimeAfterEmptyReceive: Duration;
|
||||
endpoint?: string;
|
||||
}
|
||||
|
||||
// TODO(pjungermann): validation could be improved similar to `convertToHumanDuration` at @backstage/backend-tasks
|
||||
|
||||
Reference in New Issue
Block a user