11.5 消息重发和死信队列

博客已搬家, 更好阅读体验, 猛戳 http://www.jack-yin.com/english/translation/activemq-in-action/1708.html

11.5 Message redelivery and dead-letter queues

11.5 消息重发和死信队列

When messages expire on the ActiveMQ broker (they exceed their time-to-live, if set)

or can’t be redelivered, they’re moved to a dead-letter queue, so they can be consumed

or browsed by an administrator at a later point.

当ActiveMQ 代理上的消息过期(如果设置了消息的生存期,这些消息超过了生存期),或者不能被重新分发时,

这些消息会被转移到死信队列中,因此这些消息将不能被消费或被系统管理员浏览.

扫描二维码关注公众号,回复: 671391 查看本文章

Messages are normally redelivered to a client in the following scenarios:

? A client is using transactions and calls rollback() on the session.

? A client is using transactions and closes before calling commit.

? A client is using CLIENT_ACKNOWLEDGE on a session and calls recover() on

that session.

通常,以下场景中的消息会被重新分发到客户端:

(1) 客户端使用了事务,并调用了rollback()方法

(2)客户端使用了事务,并在提交之前关闭了练级

(3)客户端使用了CLIENT_ACKNOWLEDGE的session,并调用了recover()方法

........................

猜你喜欢

转载自jackyin5918.iteye.com/blog/1990534