需要拦截@SqsListener

时间:2019-05-24 07:28:03

标签: java amazon-web-services amazon-sqs

我必须从Sqs消息中检索标头,但是我无法更改当前代码,因此标头自动装配不是一个选择。

# Test data for rankedchoice.cpp
# Expected output: 4
8
1 4 3 2
2 4 3 1
2 1 4 3
3 1 2 4
3 2 1 4
3 1 4 2
4 2 3 1
4 1 3 4

# Expected output: 4
8
4 1 3 4
4 2 3 1
3 2 1 4
3 1 2 4
2 4 3 1
2 1 4 3
1 4 3 2
3 1 4 2

# Expected output: 1
1
1 2

# Expected output: 1
1
1

# Expected output: 2
3
1 2
2 1
2

# Expected output: 1 2
2
1 2
2 1

# Expected output: 1 3
6
1 2
1 3
1
3 2
3 1
2 3

# Expected output: 1
# Because there are no first-place votes for 4, it should be eliminated,
# and the 3 4 1 2 ballots should put 1 over the top on the second ballot.
9
1 2 3 4
1 2 3 4
1 2 3 4
2 1 3 4
2 4 1 3
2 4 1 4
2 4 1 3
3 4 1 2
3 4 1 2

# Expected Output: 3
5
1 2 3
2 1 3
3 1 2
3 2 1
3

# Expected Output: 3
5
1 2 3
1 3 2
2 3 1
3 1 2
3 2 1

我尝试用@SqsListener(value = "...") public void processMessage(Message event) { processor.process(event); } 来做。我可以使用QueueMessagingTemplateQueueMessageChannel为其分配拦截器,但是我不能告诉sqs使用该模板接收消息。

感谢帮助。

0 个答案:

没有答案