3

我们正在尝试使用 HornetQ 在 Jboss AS 7.1 和文档中进行消息传递

https://docs.jboss.org/author/display/AS71/Messaging+configuration

还有一个池连接工厂,它的特殊之处在于它利用了 HornetQ JCA 资源适配器的出站适配器。它也很特别,因为:

* It is only available to local clients, although it can be configured to point to a remote server.
* As the name suggests, it is pooled and therefore provides superior performance to the clients which are able to use it.  The pool size can be configured via the max-pool-size and min-pool-size attributes.
* It should only be used to send (i.e. produce) messages.
* It can be configured to use specific security credentials via the user and password attributes.  This is useful if the remote server to which it is pointing is secured.

除了第三个子弹说的以外,每一件事都是有道理的

* 它应该只用于发送(即产生)消息。

我的 mdb 使用池连接工厂并且正在使用消息(不发送)。

我的理解是池连接工厂是 MDB 应该使用的以获得更好的性能。也是hornetq作者的说法

http://hornetq.blogspot.com/2011/06/hornetq-on-jboss-as7.html

 The pooled connection factories also define the incoming connection factory for MDB's, 
the name of the connection factory refers to the resource adapter name used by the MDB,

一些大师可以对此有所了解吗?

谢谢拉玛

4

1 回答 1

3

这是我们试图让用户更容易但仍然有些困惑的东西。

JCA 适配器指定入站连接和出站连接...

MDB 使用入站连接,而出站连接通过使用 JNDI 和实例化连接来完成。

例如,InBound 连接不需要池化,因为它们只是为 MDB 实例化消费者,并且只要您有 MDB 就一直保持...

我们保留了 PooledConnection 工厂的定义以定义 MDB,但正如我所说,在下面发生了一些事情。

所以,我们也许可以改写你提到的这个项目来更好地解释这一点。

于 2013-11-15T19:25:28.887 回答