Long lived JMS sessions. Is Keeping JMS connections / JMS sessions always opened a bad practice?

前端 未结 5 699
野性不改
野性不改 2021-02-14 08:25

Is keeping JMS connections / sessions / consumer always open a bad practice?

Code draft example:

// app startup code

ConnectionFactory cf = (ConnectionF         


        
5条回答
  •  故里飘歌
    2021-02-14 09:11

    Agreed. Here are some good tips on how to use JMS efficiently which includes keeping around connections/sessions/producers/consumers.

    You might also want to check the recommendation on using transactions too if you are interested in maximising performance.

提交回复
热议问题