<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    paulwong

    Which is better: PooledConnectionFactory or CachingConnectionFactory?

    From here:

    The difference between the PooledConnectionFactory and the CachingConnectionFactory is a difference in implementation. Below are some of the characteristics that differ between them:

    • Although both the PooledConnectionFactory and the CachingConnectionFactory state that they each pool connections, sessions and producers, the PooledConnectionFactory does not actually create a cache of multiple producers. It simply uses a singleton pattern to hand out a single cached producer when one is requested. Whereas the CachingConnectionFactory actually creates a cache containing multiple producers and hands out one producer from the cache when one is requested.

    • The PooledConnectionFactory is built on top of the Apache Commons Pool project for pooling JMS sessions. This allows some additional control over the pool because there are features in Commons Pool that are not being used by the PooledConnectionFactory. These additional features include growing the pool size instead of blocking, throwing an exception when the pool is exhausted, etc. You can utilize these features by creating your own Commons Pool GenericObjectPool using your own customized settings and then handing that object to the PooledConnectionFactory via the setPoolFactory method. See the following for additional info: http://commons.apache.org/pool/api-1.4/org/apache/commons/pool/impl/GenericObjectPoolFactory.html

    • The CachingConnectionFactory has the ability to also cache consumers. Just need to take care when using this feature so that you know the consumers are cached according to the rules noted in the blog post.

    • But most importantly, the CachingConnectionFactory will work with any JMS compliant MOM. It only requires a JMS connection factory. This is important if you are using more than one MOM vendor which is very common in enterprise organizations (this is mainly due to legacy and existing projects). The important point is that the CachingConnectionFactory works very well with many different MOM implementations, not only ActiveMQ.

    From here:

    • If you have clustered ActiveMQs, and use failover transport it has been reported that CachingConnectionFactory is not a right choice.

    • The problem I’m having is that if one box goes down, we should start sending messages on the other, but it seems to still be using the old connection (every send times out). If I restart the program, it’ll connect again and everything works. Source: Autoreconnect problem with ActiveMQ and CachingConnectionFactory

    • The problem is that cached connections to the failed ActiveMQ was still in use and that created the problem for the user. Now, the choice for this scenario is PooledConnectionFactory.

    • If you’re using ActiveMQ today, and chances are that you may switch to some other broker (JBoss MQ, WebSphere MQ) in future, do not use PooledConnectionFactory, as it tightly couples your code to ActiveMQ.

    posted on 2020-03-19 09:37 paulwong 閱讀(420) 評論(0)  編輯  收藏 所屬分類: JMS

    主站蜘蛛池模板: 亚洲av乱码一区二区三区按摩| 精品国产亚洲男女在线线电影 | 亚洲狠狠综合久久| 久久久久亚洲AV综合波多野结衣 | 免费国产污网站在线观看15| 国产免费爽爽视频在线观看| 国产色爽免费无码视频| 黄色片免费在线观看| 久久永久免费人妻精品下载| 久久精品成人免费观看| 99视频在线免费| 四虎在线最新永久免费| 中字幕视频在线永久在线观看免费| 日韩精品免费一级视频| 成人黄动漫画免费网站视频| 日韩免费a级在线观看| 国产成人免费网站在线观看| 日产国产精品亚洲系列| 中文字幕亚洲综合久久男男| 亚洲精品无码专区久久久| 亚洲成熟xxxxx电影| 亚洲小说区图片区| 亚洲精品无码不卡在线播放| 日韩欧美亚洲中文乱码| 一进一出60分钟免费视频| 玖玖在线免费视频| 亚洲免费观看在线视频| 午夜一级毛片免费视频| 亚洲国产高清精品线久久| 亚洲精品午夜国产VA久久成人| 亚洲高清不卡视频| 亚洲精品无播放器在线播放| 色多多www视频在线观看免费| a级在线免费观看| 国产h肉在线视频免费观看| 破了亲妺妺的处免费视频国产| 亚洲精品tv久久久久| 亚洲国产精品久久久久网站| 亚洲国产精品一区二区三区在线观看| 麻豆一区二区三区蜜桃免费| 精品一区二区三区免费|