Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
borderStylesolid
<bean id="queueContainerListener"
	class="org.springframework.jms.listener.DefaultMessageListenerContainer">
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="destinationName" value="Q_WM_OUT" />
		<property name="messageListener" ref="simpleListener" />
		<property name="cacheLevel" value="3" />
		<property name="concurrentConsumers" value="10" />
		<property name="maxConcurrentConsumers" value="50" />
</bean>	

It is possible to define here:

  1. initial and maximal number of concurrent consumers. This tells the Spring to always start up a initial number of consumers (concurrentConsumers). When a new message

...

  1. has been received, if the maxConcurrentConsumers has not been reached, then a new consumer is created to process the message.
  2. cache level (3- cache connection, session and consumers

...

  1. ; 2 – cache connection and session, 1 –

...

  1. cache connection only)
  2. specify message listener class (implementing MessageListener interface) and connection factory.

It is important to be aware of following things related to consumers caching:
a) it doesn't make sense to increase the number of concurrent consumers for a JMS topic. This just leads to concurrent consumption of the same message.
b) the concurrentConsumers property and the maxConcurrentConsumers property can be modified at runtime, for example, via JMX.
For the details you can refer following Bruce Snider's blog: http://bsnyderblog.blogspot.com/2010/05/tuning-jms-message-consumption-in.htmlImage Added.

You can see that Spring provides solution for both mentioned scalability aspects. But how we can use it in CXF?

...