重新启动 Wildfly 时,HornetQ 不遵守队列中的最后一个值

HornetQ not honoring Last Value in a Queue when Wildfly is restarted

以下是我 standalone.xml 中的队列定义。我拥有的队列是持久的。

<jms-queue name="CEComputeQueue">
 <entry name="queue/CEComputeQueue"/>
 <entry name="java:jboss/exported/jms/queue/CEComputeQueue"/>
</jms-queue>

具有以下地址设置。

<address-setting match="jms.queue.CEComputeQueue">
 <last-value-queue>true</last-value-queue> </address-setting>

虽然推送到队列 HornetQ 没有保留多个最后的值,因为您可以看到我从 JMX 控制台获取的输出,其中重复了“_HQ_LVQ_NAME (51)”。
要重现此内容,请按照以下步骤操作: 1. 首先,我将一个值推送到队列 (51),但它尚未处理,我停止了 Wildfly 服务器。 2. 我重新启动服务器。 3. 我将另一个值推入队列 (51)。

注意:虽然队列是 LAST Value Queue ,但它仍然有多个相同的条目如下所示。

决议?

** 怎么解决,是HornetQ的Bug还是Behavior and 问题的可能解决方案是什么。**

使用 JMX 的输出:

[standalone@localhost:9990 /] /subsystem=messaging/hornetq-server=default/jms-queue=CEComputeQueue:list-messages

{
    "outcome" => "success",
    "result" => [
        {
            "JMSMessageID" => "ID:b620436a-ce84-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360041009L,
            "_HQ_LVQ_NAME" => "51",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "60fe5c1a-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426803011453L
        },
        {
            "JMSMessageID" => "ID:c7a3aaee-ce8d-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360041166L,
            "_HQ_LVQ_NAME" => "49",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "6112f59e-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426806906306L
        },
        {
            "JMSMessageID" => "ID:4c4952f8-ce95-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360041269L,
            "_HQ_LVQ_NAME" => "51",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "60fe5c1a-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426810135328L
        },
        {
            "JMSMessageID" => "ID:2a4048fd-cea1-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360041517L,
            "_HQ_LVQ_NAME" => "51",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "61105d84-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426815232187L
        },
        {
            "JMSMessageID" => "ID:cdc0d5f8-cea5-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360041946L,
            "_HQ_LVQ_NAME" => "49",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "60fe5c1a-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426817224485L
        },
        {
            "JMSMessageID" => "ID:0e169a9e-cea7-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360042115L,
            "_HQ_LVQ_NAME" => "50",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "6112f59e-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426817761918L
        },
        {
            "JMSMessageID" => "ID:185fd030-cea7-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360042124L,
            "_HQ_LVQ_NAME" => "16",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "60fe5c1a-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426817779175L
        },
        {
            "JMSMessageID" => "ID:4c614265-cea7-11e4-a3d7-f9d18c2c2348",
            "JMSExpiration" => 0,
            "messageID" => 34360042157L,
            "_HQ_LVQ_NAME" => "51",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "6112f59e-ce52-11e4-a3d7-f9d18c2c2348",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426817866426L
        },
        {
            "JMSMessageID" => "ID:5b14c783-cead-11e4-92c2-e36be9318636",
            "JMSExpiration" => 0,
            "messageID" => 36507524460L,
            "_HQ_LVQ_NAME" => "49",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "a3519e4e-cea8-11e4-92c2-e36be9318636",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426820468071L
        },
        {
            "JMSMessageID" => "ID:5e94c684-cead-11e4-92c2-e36be9318636",
            "JMSExpiration" => 0,
            "messageID" => 36507524462L,
            "_HQ_LVQ_NAME" => "51",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "a3519e4e-cea8-11e4-92c2-e36be9318636",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426820473943L
        },
        {
            "JMSMessageID" => "ID:a5bed858-cea9-11e4-92c2-e36be9318636",
            "JMSExpiration" => 0,
            "messageID" => 36507523986L,
            "_HQ_LVQ_NAME" => "50",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "a3519e4e-cea8-11e4-92c2-e36be9318636",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426818875350L
        },
        {
            "JMSMessageID" => "ID:20a629be-ceaa-11e4-92c2-e36be9318636",
            "JMSExpiration" => 0,
            "messageID" => 36507524057L,
            "_HQ_LVQ_NAME" => "16",
            "address" => "jms.queue.CEComputeQueue",
            "JMSDeliveryMode" => "PERSISTENT",
            "__HQ_CID" => "a3519e4e-cea8-11e4-92c2-e36be9318636",
            "JMSPriority" => 4,
            "JMSTimestamp" => 1426819081548L
        }
    ]
}

这是一个错误,在 Wildfy Jira 中提出。 这里是link。 https://issues.jboss.org/browse/WFLY-4479