1

我们能否使用 Java-DSL 语法向 Amazon SQS“FIFO”队列发送消息:

from("..")..to("aws-sqs://testSQSFifo.fifo?amazonSQSClient=#amazonSQSClient);

请记住:这是一个 FIFO 队列,因此它需要 MessageGroupID 和 MessageDeduplicationID。

4

1 回答 1

0

尝试使用以下语法:

from("..")..to("aws-sqs://testSQSFifo.fifo?amazonSQSClient=#amazonSQSClient&messageGroupIdStrategy=STRATEGY);

其中STRATEGY可以是以下选项之一:useConstantuseExchangeIdusePropertyValue。对于 usePropertyValue 选项,将使用属性 CamelAwsMessageGroupId 的值。

见:https ://github.com/apache/camel/blob/master/components/camel-aws-sqs/src/main/docs/aws-sqs-component.adoc

于 2019-03-20T21:01:48.150 回答