temp queues not going away, hitting resource limits

View: New views
4 Messages — Rating Filter:   Alert me  

temp queues not going away, hitting resource limits

by newton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We are regularly seeing ResourceLimitExcepptions on temp queues per connection and producers per connection. As far as we can tell by using the "jmap" tool, there appear to be cases where temp queues never disappear if they never get a reply. Aren't the temp reply queues supposed to be deleted after the receiveTimeout and timeToLive expire?

We are using SwiftMQ 7.5.1 via Spring, with the following configuration

    <bean id="jmsConnectionFactory" class="com.swiftmq.jms.springsupport.SingleSharedConnectionFactory" destroy-method="destroy">
        <property name="targetConnectionFactory">
            <bean class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiTemplate">
                    <bean id="swiftMQJndiTemplate"
                          class="org.springframework.jndi.JndiTemplate">
                        <property name="environment">
                            <props>
                                <prop key="java.naming.factory.initial">com.swiftmq.jndi.InitialContextFactoryImpl
                                </prop>
                                <prop key="java.naming.provider.url">${mailDataService.messageQueue.brokerURL}</prop>
                            </props>
                        </property>
                    </bean>
                </property>
                <property name="jndiName" value="QueueConnectionFactory"/>
            </bean>
        </property>
        <property name="poolExpiration" value="120000"/>
    </bean>

this jmsConnectionFactory is in turn being used in an Apache CXF service, configured as follows:

    <jaxws:client id="imapMailAgent" address="jms://"
                  serviceClass="server.interfaces.maildata.agent.MailDataAgent">
        <jaxws:features>
            <bean class="org.apache.cxf.transport.jms.JMSConfigFeature">
                <property name="jmsConfig">
                    <bean class="org.apache.cxf.transport.jms.JMSConfiguration">
                        <property name="connectionFactory" ref="jmsConnectionFactory"/>
                        <property name="targetDestination" value="${imapMailAgent.messageQueue.requestQueue}"/>
                        <property name="receiveTimeout" value="${imapMailAgent.messageQueue.timeout}"/>
                        <property name="timeToLive" value="${imapMailAgent.messageQueue.timeout}"/>
                        <property name="useJms11" value="true"/>
                    </bean>
                </property>
            </bean>
        </jaxws:features>
    </jaxws:client>

Any insights on what is happening?

thanks
M.

Re: temp queues not going away, hitting resource limits

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

newton wrote:
Aren't the temp reply queues supposed to be deleted after the receiveTimeout and timeToLive expire?
Temp queues are being delete if a) it's delete() method is called or b) the corresponding JMS connection from which the temp queue was created is closed. That's JMS spec.

I don't know what Apache CXF or Spring is doing here...

Re: temp queues not going away, hitting resource limits

by eustice :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How does this interact with the SwiftMQ SingleSharedConnectionFactory then? If we only have a single shared JMS connection to SwiftMQ that is being shared by a number of consumers (courtesy of the SingleSharedConnectionFactory), do we have to shut the whole thing down for those temporary queues to be cleaned up?


Re: temp queues not going away, hitting resource limits

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

SingleSharedConnectionFactory uses a single shared JMS connection and pools sessions, producers and consumers. It doesn't pool temp queues.

It looks like Apache CXF leaks temp queues. But it seems you can configure it away; look here, section "Using a named reply destination".