ActiveMQ Artemis STOMP NACK 不兼容

问题描述 投票:0回答:1

我正在使用 ActiveMQ Artemis 2.31.2 和 STOMP 协议。我想要重新传送消息或将消息放置在 DLQ 上,但是 ActiveMQ Artemis 的源代码显示:

@Override
public StompFrame onNack(StompFrame request) {
   //this eventually means discard the message (it never be redelivered again).
   //we can consider supporting redeliver to a different sub.
   return onAck(request);
}

什么解决方案可以替代 NACK?我搜索并查看了官方源代码。

activemq-artemis stomp
1个回答
0
投票

我建议您将

ack
框架上的
SUBSCRIBE
标头设置为
client-individual
,这意味着您可以确认您喜欢的任何消息,然后当您关闭连接时,您没有确认的任何消息将被放回正在排队等待交付给其他消费者。

© www.soinside.com 2019 - 2024. All rights reserved.