Apache James 队列落后

Apache James 队列落后

由于某种原因,我经常遇到队列释放问题,因为发送的消息总是比实际发送的消息晚一个。James 设置为将传入消息发送到网关 (Postfix)。

RemoteDelivery 类具有以下功能:

        // Set it to try to deliver (in a separate thread) immediately
        // (triggered by storage)

“存储”到底是什么以及在哪里配置?

我设置了一个 mailet,它将匹配的消息(基于收件人域)发送到网关(在 mailetcontainer 中指定)。这可以正常工作,直到某个时候它“卡住”无法传递到网关。在 James 日志中,它显示为Successfully spooled mail来自发件人,然后显示为

[TID=83] INFO  11:04:54,858 | james.smtpserver | Id='1510412390' User='' Successfully spooled mail Mail1581005094857-978ba32f-74e6-4ca1-b903-7994637a9873 from <address@remote> on <remote sender IP> for [<address@local>]
...
[TID=734] INFO  11:04:55,290 | james.mailetcontext | Remotely delivering mail Mail1581005094857-978ba32f-74e6-4ca1-b903-7994637a9873
[TID=34] INFO  11:04:55,290 | james.mailetcontext | Remote delivery thread (0) will process mail Mail1581005072858-90055113-03cf-4bc0-84d7-d47d176feef2
[TID=34] INFO  11:04:55,290 | james.mailetcontext | Attempting to deliver Mail1581005072858-90055113-03cf-4bc0-84d7-d47d176feef2
[TID=734] INFO  11:04:55,312 | james.mailetcontext | Adding SMTP gateway: <gateway address>
[TID=734] INFO  11:04:55,312 | james.mailetcontext | Sending mail to [<address@local>] via [<gateway address>]
[TID=34] INFO  11:04:55,312 | james.mailetcontext | Adding SMTP gateway: <gateway adrdress>
[TID=34] INFO  11:04:55,312 | james.mailetcontext | Attempting delivery of Mail1581005072858-90055113-03cf-4bc0-84d7-d47d176feef2 to host <gateway adrdress> at <gateway adrdress> from <address@remote> for addresses [<address@local>]]

但我没有看到邮件已成功发送到网关。

为了让它“解开”,我需要将另一条传入消息发送到 James,该消息将命中相同的邮件,以将之前卡住的消息推送到假脱机。然后在 James 日志中它将显示为

[TID=35] INFO  11:22:14,443 | james.mailetcontext | Mail (Mail1581005094857-978ba32f-74e6-4ca1-b903-7994637a9873) sent successfully to <gateway adrdress> at <gateway adrdress> from <address@remote> for [[<address@local>]]

看起来,如果中继主机发生变化,相关队列的行为就会开始发生变化,就像一根纸巾管,一端塞入乒乓球。只有塞入足够多的球后,才会从另一端取出一个。对此有什么看法?

答案1

发现 ActiveMQ ver 5.4.2 有问题。升级到 5.5.1 后队列问题就解决了。

相关内容