此内容没有您所选择的语言版本。

Chapter 9. Enabling JBoss Messaging Ordering Group


This section describes how to use the JBoss Messaging ordering group feature to achieve strict message ordering.
Message ordering groups is the JBoss Messaging implementation of strict message ordering. When the ordering group feature is enabled, message priorities no longer have an influence on the order that the messages are delivered. Messages of a particular ordering group are delivered in the exact order that they arrive at the target queue (FIFO).
The next message of an ordering group is delivered only after the delivery of the previous messages has been accomplished. To signalize a successful message delivery, the acknowledge mechanism is used (refer to Section 9.1, “Acknowledge Mechanism”).
Transactional Receipt

In the case of the transactional receipt of messages, the next message is not delivered until the transaction has been committed which includes the acknowledgment of the receipt of the current message. If the transaction is rolled back, the message is canceled, sent back to the JMS server, and made available for the next delivery.

9.1. Acknowledge Mechanism

The messages that form a part of an ordering group are delivered one at a time. The next message is delivered only after the delivery of a previous message was completed. Message delivery completion is signaled by various means, depending on the acknowledge mode settings:
  • In the CLIENT_ACKNOWLEDGE mode, the completion state is signalized by the Message.acknowledge() method.
  • In the AUTO_ACKNOWLEDGE and DUPS_OK_ACKNOWLEDGE modes, the completion is signalized by either of the following:
    • a successful return from one of the MessageConsumer.receive() methods, or
    • a successful return from the onMessage() call of the MessageListener().

Note

If the message consumer is closed, the message being processed at the time of its closure is deemed as completed and that regardless of whether *_ACKNOWLEDGE was called prior to the closure of the consumer.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部