mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
Fix[Eventbridge pipe - SQS] Eventbridge pipe always delivers sqs message to default region (#714)
* Issue #647 Fix- Added missing region functionality. * Issue #647 Fix- Added missing region functionality.
This commit is contained in:
1 parent
bd3a33326c
commit
254990c089
3 files changed
+31
-15
No files matched your search
@@ -65,7 +65,7 @@ public class PipesTargetInvoker {
|
||||
if (targetArn.contains(":lambda:") || targetArn.contains(":function:")) {
|
||||
invokeLambda(targetArn, payload, region);
|
||||
} else if (targetArn.contains(":sqs:")) {
|
||||
invokeSqs(targetArn, payload);
|
||||
invokeSqs(targetArn, payload, region);
|
||||
} else if (targetArn.contains(":sns:")) {
|
||||
invokeSns(targetArn, payload, region);
|
||||
} else if (targetArn.contains(":events:")) {
|
||||
@@ -90,6 +90,12 @@ public class PipesTargetInvoker {
|
||||
LOG.debugv("Pipe delivered to SQS: {0}", arn);
|
||||
}
|
||||
|
||||
private void invokeSqs(String arn, String payload, String region) {
|
||||
String queueUrl = AwsArnUtils.arnToQueueUrl(arn, baseUrl);
|
||||
sqsService.sendMessage(queueUrl, payload, 0, region);
|
||||
LOG.debugv("Pipe delivered to SQS: {0}", arn);
|
||||
}
|
||||
|
||||
private void invokeSns(String arn, String payload, String region) {
|
||||
String topicRegion = extractRegionFromArn(arn, region);
|
||||
snsService.publish(arn, null, payload, "Pipes", topicRegion);
|
||||
|
||||
@@ -309,6 +309,10 @@ public class SqsService {
|
||||
return sendMessage(queueUrl, body, delaySeconds, null, null);
|
||||
}
|
||||
|
||||
public Message sendMessage(String queueUrl, String body, int delaySeconds, String region) {
|
||||
return sendMessage(queueUrl, body, delaySeconds, null, null, region);
|
||||
}
|
||||
|
||||
public Message sendMessage(String queueUrl, String body, int delaySeconds,
|
||||
String messageGroupId, String messageDeduplicationId) {
|
||||
return sendMessage(queueUrl, body, delaySeconds, messageGroupId, messageDeduplicationId, null,
|
||||
|
||||
Reference in new issue
Block a user