Since SingleSharedConnectionFactory is only a wrapper around a target connection factory, you need to configure the target connection factory's consumer cache size. For example, if you spring config is like this:
<bean id="jmsConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean"
lazy-init="true">
<property name="jndiTemplate">
<ref bean="jndiTemplate"/>
</property>
<property name="jndiName">
<value>plainsocket@router1</value>
</property>
</bean>
<bean id ="singleSharedConnectionFactory"
class="com.swiftmq.jms.springsupport.SingleSharedConnectionFactory"
destroy-method="destroy" >
<property name="targetConnectionFactory" ref="jmsConnectionFactory"/>
<property name="poolExpiration" value="120000"/>
<property name="clientId" value="test"/>
</bean>
then you use "plainsocket@router1" as your target connection factory and can configure it appropriately in your routerconfig.xml:
<listener name="plainsocket" port="4001">
<connection-factories>
<connection-factory name="ConnectionFactory"/>
<connection-factory name="QueueConnectionFactory"/>
<connection-factory name="TopicConnectionFactory"/>
<connection-factory name="plainsocket@router1" smqp-consumer-cache-size="10"/>
</connection-factories>
<host-access-list/>
</listener>