【问题标题】:Websphere MQ topics - are they strictly ordered?Websphere MQ 主题 - 它们是否严格排序?
【发布时间】:2014-02-12 11:47:11
【问题描述】:

您订阅了strictly ordered 的Websphere MQ topic 是否收到消息?

换句话说,以与queue 类似的方式,鉴于您的连接保持不变,您能否保证按照发送顺序接收topic 消息?

【问题讨论】:

    标签: java messaging ibm-mq jms-topic


    【解决方案1】:

    根据 JMS 规范

    JMS defines that messages sent by a session to a destination must be received
    in the order in which they were sent. This defines a partial ordering
    constraint on a session’s input message stream.
    
    JMS does not define order of message receipt across destinations or across
    a destination’s messages sent from multiple sessions. This aspect of a
    session’s input message stream order is timing-dependent. It is not under    
    application control.
    

    还有

    Although clients loosely view the messages they produce within a session
    as forming a serial stream of sent messages, the total ordering of this stream
    is not significant. The only ordering that is visible to receiving clients is
    the order of messages a session sends to a particular destination.
    Several things can affect this order like message priority, 
    persistent/non persistent etc.
    

    所以要回答您的问题,not really JMS provider specific 收到了哪些订单消息。它们将按照与上述信息一起发送的顺序被接收。然而,消息传递到服务器的顺序会受到消息优先级、持久性/非持久性等限制的约束。

    【讨论】:

    • 好的,我只是想检查一下这是否适用于topic 以及queue,对吗?谢谢
    • 是的,它适用于Destination,它可以是QueueTopic
    • 除了 Aniket 的关于规范的 cmets 之外,通常的 WMQ 约束也适用。例如,如果消息遍历 QMgr-to-QMgr 通道并且具有不同的优先级或持久性,如果消息可以遵循多个路径,如果消息传递到的队列中有多个消费者(因为在涵盖主题将消息传递到队列,即使应用程序不将它们视为队列),如果队列溢出到 DLQ 等,那么它们可能不会按照发送的顺序到达。该规范提到了这一点,它谈到了多个目的地。
    猜你喜欢
    • 2011-05-29
    • 2014-05-06
    • 2011-05-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多