[jboss-user] [JBoss Messaging] - Re: JmsTemplate w/ JBM still discouraged?

timfox do-not-reply at jboss.com
Fri Oct 10 04:59:11 EDT 2008


"jmoscato" wrote : From the Spring 2.5.x documentation, it appears that it would be safe to listen for messages using a Spring message driven pojo, a DefaultMessageListenerContainer configured with a JmsTransactionManager, and a container managed connection factory (/JmsXA) .
  | 
  | Is the above statement correct?
  | 
  | 

I haven't looked in the new Spring code, but if it's still creating a new consumer to receive each message, then, *even if you're using a JCA JMS resource adapter* (e.g. JmsXA in JBoss), that is not safe!

The resource adapter will only cache sessions, not consumers. So a new consumer will still be created each time. That means, on a topic with a non durable subscriber, any messages that arrive between one consumer and the next, will appear to be lost.

Also each consumer is likely to cache a bunch of messages, so every time you close one they have to be rolled back to the queue.

==> Horribly slow + "Lost" messages




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181405#4181405

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181405



More information about the jboss-user mailing list