Search code examples
javaperformancejmstibcotibco-ems

What steps can be taken to optimize tibco JMS to be more performant?


We are running a high throughput system that utilizes tibco-ems JMS to pass large numbers of messages to and from our main server to our client connections. We've done some statistics and have determined that JMS is the causing a lot of latency. How can we make tibco JMS more performant? Are there any resources that give a good discussion on this topic.


Solution

  • Using non-persistent messages is one option if you don't need persistence. Note that even if you do need persistence, sometimes it's better to use non persistent messages, and in case of a crash perform a different recovery action (like resending all messages)

    This is relevant if:

    • crashes are rare (as the recovery takes time)
    • you can easily detect a crash
    • you can handle duplicate messages (you may not know exactly which messages were delivered before the crash

    EMS also provides some mechanisms that are persistent, but less bullet proof then classic guaranteed delivery these include:

    • instead of "exactly once" message delivery you can use "at least once" or "up to once" delivery.
    • you may use the pre-fetch mechanism which causes the client to fetch messages to memory before your application request them.