its probably a Spring issue, if you can provide us an example that isnt using Sprring we may be able to help.
Yes but our platform is Spring.
Are you sure there is nothing else I could check out?
99 times out of 100 these issues are usually spring related, there is nothing obvious i can see. Try running without Spring, if you get the same issues then we can take a look, or provide a self contained test/project that we can easily run
As far as I remember JMSTemplate is doing some things in a DB-like manager. i.e. by creating components every time what will make your client do round trips as opposed to asynchronous communication: Result would be latency increase!
you should create a consumer and receive regularly.. if you also create a consumer and close it every time, you will increase the latency.
Maybe there are caches done on JMS Template. this would decrease the latency as the consumers are reused?
You can of course still use JMS Template from spring if you like.. but we can't be blamed for something done wront at the JMS Template. I remember having issues with JMS Template since my old days of JBoss Messaging. It's probably a generic issue that's not only associated with HornetQ.
The wierd thing here is that if I execute a single execution the latency is 0 ms only when I load test I get those latency problems. more over it doesnt happen with all consumers.
I am using the jms template cache mechanisem.
In any syste you measure, you need to measure after a steady state. There's a lot going on on the JVM, plus opening connections at the first messages.
Anyway: as far as I remember, the JMSTemplate has a cache for Connection but not for consumers. I may be wrong though.
- send thousands of messages, and start measuring after a few minutes of sustainable load.
- Do the same test without JMSTemplate
They you may get a more accurate figure.