开发者

JMS Session pooling for large numbers of Topic subscribers

I'm writing an app that will create lots of JMS topic subscribers. What is best practise regarding reusing sessions?

A session per subscriber? A pool of sessions? With a session per subscriber the thread count seems unreasonable. Is this a job for something like a ServerSessionPool? What I've seen so far seems to suggest that ServerSessionPool is more geared towards one receiver consuming messages concurrently rather than lots of receivers.

I'm currently working with HornetQ 2.0.0GA embedded in JBos开发者_如何学运维s EAP 4.3.0CP6.


Most likely you will need many sessions since a session is per-thread. Here's a link to a really good Stack Overflow response that explains the context.

In the unlikely event that your JMS topic subscriptions are all within the same thread, note that they will all also share the same unit of work if its a transacted session.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜