Try PubSub+

Spring JMS Session Usage.

What would be the best practice in the usage of JMS Sessions?
Is it good to reuse a Single Session to handle multiple publishers & subscribers?
What would be the benefits if I go for individual Sessions?

Answers

  • marcmarc Member, Administrator, Moderator, Employee Posts: 173 admin
    edited January 15

    Hi @arun_xi_kumar,
    In general we see people scale their JMS apps by creating more JMSConnections, not JMSSessions. There is a single dispatcher thread per JMSConnection so no matter how many JMSSessions are created as part of a single JMSConnection they'd be sharing that same dispatcher thread.

    Also keep in mind the number of cores you'll have available to process messages as having 10 connections won't do you much good if you only have 2 cores to process them.

    You can find this explained in more detail in the threading section of our JMS API docs here: https://docs.solace.com/Solace-JMS-API/Threading.htm

    Hope that helps!

  • honghong Administrator Posts: 77 admin

    @arun_xi_kumar Did Marc answer your question? If yes, please accept the answer by clicking "Yes" in the line above "Did this answer the question?".

Sign In or Register to comment.