activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbarlabanov <cont...@sergiy-barlabanov.de>
Subject Re: RedeliveryPlugin causes a deadlock with JobSchedulerImpl in ActiveMQ 5.7.0
Date Thu, 08 Nov 2012 16:21:35 GMT
Actually, the DLQ is disabled for expired messages using
individualDeadLetterStrategy. See below for our broker configuration.
Expired messages does not occur in the DLQ. So may be they are removed after
they are dispatched to DLQ. I do not know the code of ActiveMQ that good and
do not know where the DLQ plugin is called - before or after dispatching :(.
Does the deadlock problem has something to do with expired messages? I think
the code works the same way for all messages. So the deadlock problem may
occur also for normal redeliveries. It seems that RedeliveryPlugin and
JobSchedulerImpl may block each other under certain circumstances. I see no
point in code where the measures are taken to avoid that blocking. For me it
smells like a bug: RedeliveryPlugin blocks on JobSchedulerImpl call, which
is blocked on the queue send call, which is in turn blocked by
RedeliveryPlugin.

broker-config.xml:

    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="dcdng" useJmx="true" useShutdownHook="false"
schedulerSupport="false">

        <managementContext>
            
            <managementContext createConnector="false"/>
        </managementContext>

        <persistenceAdapter>
            <kahaDB directory="${activemq.message.storage}"
journalMaxFileLength="10mb"/>
        </persistenceAdapter>

        <transportConnectors>
            <transportConnector uri="${activemq.connector.address}"/>
        </transportConnectors>

        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    
                    <policyEntry queue=">" producerFlowControl="true">
                        <deadLetterStrategy>
                            
                            <individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true" processExpired="false" enableAudit="false"/>
                        </deadLetterStrategy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

        <plugins>
            <redeliveryPlugin fallbackToDeadLetter="true"
sendToDlqIfMaxRetriesExceeded="true">
                <redeliveryPolicyMap>
                    <redeliveryPolicyMap>
                        <redeliveryPolicyEntries>
                            <redeliveryPolicy queue="EventQueue"
maximumRedeliveries="10"
                                              redeliveryDelay="1000"/>
                        </redeliveryPolicyEntries>
                        <defaultEntry>
                            <redeliveryPolicy maximumRedeliveries="3"
                                              redeliveryDelay="1000"/>
                        </defaultEntry>
                    </redeliveryPolicyMap>
                </redeliveryPolicyMap>
            </redeliveryPlugin>
        </plugins>

        <systemUsage>
            <systemUsage sendFailIfNoSpace="true">
                <memoryUsage>
                    <memoryUsage limit="200 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1000 mb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="200 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>
    </broker>




--
View this message in context: http://activemq.2283324.n4.nabble.com/RedeliveryPlugin-causes-a-deadlock-with-JobSchedulerImpl-in-ActiveMQ-5-7-0-tp4659019p4659052.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message