代码之家  ›  专栏  ›  技术社区  ›  Nikhil Jain

Camel AMQP autoAck无法解析终结点

  •  0
  • Nikhil Jain  · 技术社区  · 6 年前

    from("amqp:queue:testqueue?autoAck=false&concurrentConsumers=1")
    

    但我得到一个错误消息:

    Failed to create route route1: Route(route1)[[From[amqp:queue:testqueue?autoAck=false&concu... because of Failed to resolve endpoint: amqp://queue:testqueue?autoAck=false&concurrentConsumers=1 due to: Failed to resolve endpoint: amqp://queue:testqueue?autoAck=false&concurrentConsumers=1 due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{autoAck=false}]
    

    我正在尝试处理来自服务总线队列的消息,但不希望在处理未完成之前删除它们。

    1 回复  |  直到 6 年前
        1
  •  0
  •   Nikhil Jain    6 年前

    我终于找到了答案,为了仅当消费者接受消息并确认消息已成功处理时才从队列中删除消息,您需要在路由中添加“acknowledgementModeName”

    from("amqp:queue:testqueue?acknowledgementModeName=CLIENT_ACKNOWLEDGE&concurrentConsumers=1")
    

    欲了解更多详情,请访问本页 http://camel.apache.org/jms.html