获取状态代码:400 同时尝试使用 apache camel 消耗来自 AWS sqs 的消息
Getting Status Code: 400 while trying too consume message from AWS sqs using apache camel
这里是使用的骆驼配置:
from("aws-sqs://sqs.ap-south-1.amazonaws.com/350349789562/notification_queue?amazonSQSClient=#sqsClient")
我确实拥有 AWS
SQS
所需的权限,但从 SQS
收到无效参数错误
org.apache.camel.spring.boot.CamelSpringBootInitializationException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route1:
Route(route1)[[From[aws-sqs://sqs.ap-south-1.amazonaws.com/3...
because of Failed to resolve endpoint:
aws-sqs://sqs.ap-south-1.amazonaws.com/350349789562/notification_queue?amazonSQSClient=%23sqsClient
due to: Can only include alphanumeric characters, hyphens, or
underscores. 1 to 80 in length (Service: AmazonSQS; Status Code: 400;
Error Code: InvalidParameterValue; Request ID:
78483b78-a847-50e0-803d-6926743498cf)
Blockquote
uri 格式应为 aws-sqs://queueName[?options]。查找更多详细信息here
你的情况是
aws-sqs://notification_queue?amazonSQSClient=#sqsClient
其余细节将作为选项提供。大概是
queueOwnerAWSAccountId=350349789562®ion=ap-south-1
这里是使用的骆驼配置:
from("aws-sqs://sqs.ap-south-1.amazonaws.com/350349789562/notification_queue?amazonSQSClient=#sqsClient")
我确实拥有 AWS
SQS
所需的权限,但从 SQS
org.apache.camel.spring.boot.CamelSpringBootInitializationException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[aws-sqs://sqs.ap-south-1.amazonaws.com/3... because of Failed to resolve endpoint: aws-sqs://sqs.ap-south-1.amazonaws.com/350349789562/notification_queue?amazonSQSClient=%23sqsClient due to: Can only include alphanumeric characters, hyphens, or underscores. 1 to 80 in length (Service: AmazonSQS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 78483b78-a847-50e0-803d-6926743498cf)
Blockquote
uri 格式应为 aws-sqs://queueName[?options]。查找更多详细信息here
你的情况是
aws-sqs://notification_queue?amazonSQSClient=#sqsClient
其余细节将作为选项提供。大概是
queueOwnerAWSAccountId=350349789562®ion=ap-south-1