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

22.6. Caution with Addresses with Multiple Queues


When a message is routed to an address that has multiple queues bound to it; for example a JMS subscription, there is only one copy of the message in memory. Each queue only deals with a reference to this. This means that the memory is only freed up once all queues referencing the message have delivered it.
For example:
  • An address has ten queues
  • One of the queues does not deliver its messages (maybe because of a slow consumer).
  • Messages continually arrive at the address and paging is started.
  • The other nine queues are empty even though messages have been sent.
In this example the process has to wait until the last queue has delivered some of its messages before the process can depage and the other queues finally receive some more messages.

Important

Message selectors will only operate on messages in memory. If you have a large amount of messages paged to disk and a selector that only matches some of the paged messages, those messages will not be consumed until the messages in memory have been consumed.
HornetQ does not scan through page files on disk to locate matching messages. This is not the primary role of a messaging system. A relational database is recommended for implementations using selectors to select small subsets of messages in very large queues, because this functionality is similar to executing queries over tables in a relational database.

Important

Do not set page-size-bytes (on the server) to a value lower than ack-batch-size (in the client) or your system may appear to hang.
Messages remain in server memory until they are acknowledged the server, therefore contributing to message sizes on a particular address.
If messages are paged to disk for an address, and are being consumed, they will be depaged from disk when enough memory has been freed up in that address after messages have been consumed and acknowledged. However if messages are not acknowledged then more messages will not be depaged since there is no free space in memory. In this case message consumption can appear to hang.
If a message is not acknowledged explicitly, it will be acknowledged according to the "ack-batch-size" setting in the client.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat