在创建大量主题时,ActiveMQ会抛出OOME

时间:2020-11-28 16:56:51

I'm using ActiveMQ 5.2 and my application requires a large number of topics, somewhere in the neighbourhood of 500,000. When I run my application, after creating only about 1000 topics, ActiveMQ throws an OutOfMemoryException.

我正在使用ActiveMQ 5.2,我的应用程序需要大量的主题,在500,000附近。当我运行我的应用程序时,在仅创建大约1000个主题后,ActiveMQ抛出OutOfMemoryException。

Is it unreasonable to expect ActiveMQ to support this number of topics?

期望ActiveMQ支持这么多话题是不合理的吗?

Is there an optimal configuration for this usage?

这种用法是否有最佳配置?

This thread details the issue: http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-td17005441.html

该主题详细说明了这个问题:http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-td17005441.html

1 个解决方案

#1


that is an interesting thread but it did not result in a jira issue so I wonder if not using the dedicated task runner is the solution here. Using a thread pool instead of a dedicated task runner should decouple the creation of destinations from the creation of threads. If this is not the case, then please open a jira issue and assign it to me.

这是一个有趣的线程,但它没有导致jira问题所以我想知道如果不使用专用任务运行器是这里的解决方案。使用线程池而不是专用任务运行器应该从创建线程中分离目标的创建。如果不是这样,那么请打开一个jira问题并分配给我。

There is some more general info @ http://activemq.apache.org/javalangoutofmemory.html

有一些更一般的信息@ http://activemq.apache.org/javalangoutofmemory.html

#1


that is an interesting thread but it did not result in a jira issue so I wonder if not using the dedicated task runner is the solution here. Using a thread pool instead of a dedicated task runner should decouple the creation of destinations from the creation of threads. If this is not the case, then please open a jira issue and assign it to me.

这是一个有趣的线程,但它没有导致jira问题所以我想知道如果不使用专用任务运行器是这里的解决方案。使用线程池而不是专用任务运行器应该从创建线程中分离目标的创建。如果不是这样,那么请打开一个jira问题并分配给我。

There is some more general info @ http://activemq.apache.org/javalangoutofmemory.html

有一些更一般的信息@ http://activemq.apache.org/javalangoutofmemory.html