如何在WildFly 10中动态更改JMS队列MDB池大小 [英] How to dynamically change JMS queue MDB pool size in WildFly 10

查看:201
本文介绍了如何在WildFly 10中动态更改JMS队列MDB池大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Artemis附带的WildFly 10.1作为新的JMS提供程序,但是我无法找到如何动态更改特定MDB的使用者线程数.

I am working with WildFly 10.1 which ships with Artemis as the new JMS provider but I am unable to find how to dynamically change the number of consumer threads for a specific MDB.

我有一个队列,并且有一个使用队列中消息的消息侦听器(MDB),现在我想动态控制域必须启动的使用者线程的最大数量.

I have a queue, and a message listener (MDB) consuming messages from the queue, now I want to dynamically control the maximum number of consumers threads the domain must start.

如何使用CLI?

推荐答案

要为特定 MDB进行此配置,您可以首先将其分配给专用池.请参阅此答案.

As you want to do this configuration for a specific MDB you could firstly assign it to a dedicated pool. See this answer.

然后要动态更新池属性,可以查看本文如何使用jboss-cli或standalone.xml配置来配置或添加ejb3池. (对于JBOSS 7,但在Wildfly 10中应该没有什么不同)

Then to dynamically update your pool attributes you could take a look at this article which describes how to configure or add ejb3 pools using jboss-cli or standalone.xml configuration. (with JBOSS 7, but it should not be so different with Wildfly 10)

然后,可以使用以下jboss-cli命令来动态修改您的池大小,因为MDB的默认大小为20:

The following jboss-cli command could then be used to modify your pool size dynamycally as it defaults to 20 for MDBs:

/subsystem=ejb3/strict-max-bean-instance-pool=myPool:write-attribute(name=max-pool-size)

最后,看来您还必须在MDB中相应地配置"maxSession"激活配置属性.参见此线程,以及

Finally, it seems you also have to configure the 'maxSession' activation configuration property accordingly in your MDB. See this thread and also this question for contextual configuration.

这篇关于如何在WildFly 10中动态更改JMS队列MDB池大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆