You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by fpapon <fp...@apache.org> on 2023/09/06 07:08:23 UTC

[activemq-classic] Clean up scheduler not working on all messages in DLQ

Hi,

I have an ActiveMQ (5.16.2/JDK11) broker with persistence message (kahadb).

We are using a deadletter strategy to clean messages older than 7 days 
but we can see that some of the older message are not clean up and we 
don't have any error/warning message in the logs...

Here the config.xml of the broker:

<broker xmlns="http://activemq.apache.org/schema/core"
             brokerName="localhost"
             dataDirectory="${activemq.data}"
             schedulerSupport="true"
             useJmx="true">

         <destinationPolicy>
             <policyMap>
               <policyEntries>
                   <policyEntry queue=">" queuePrefetch="500">
                       <deadLetterStrategy>
                           <sharedDeadLetterStrategy 
expiration="604800000"/> <!-- 7 days -->
                       </deadLetterStrategy>
                       <pendingMessageLimitStrategy>
                           <constantPendingMessageLimitStrategy 
limit="1000"/>
                       </pendingMessageLimitStrategy>
                   </policyEntry>

                   <policyEntry topic=">" >
                   <pendingMessageLimitStrategy>
                     <constantPendingMessageLimitStrategy limit="1000"/>
                   </pendingMessageLimitStrategy>
                 </policyEntry>
               </policyEntries>
             </policyMap>
         </destinationPolicy>

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

         <persistenceAdapter>
             <kahaDB directory="${activemq.data}/kahadb"
                     indexWriteBatchSize="1000"
                     indexCacheSize="2000"
                     journalMaxFileLength="5mb"
                     checkForCorruptJournalFiles="true"
                     ignoreMissingJournalfiles="true"
                     maxAsyncJobs="5000"
                     concurrentStoreAndDispatchQueues="true"
                     concurrentStoreAndDispatchTopics="true"
                     enableJournalDiskSyncs="true"
                     enableIndexWriteAsync="true"/>
         </persistenceAdapter>

         <systemUsage>
             <systemUsage sendFailIfNoSpace="true">
                 <memoryUsage>
                     <memoryUsage percentOfJvmHeap="70" />
                 </memoryUsage>
                 <storeUsage>
                     <storeUsage limit="85 gb"/>
                 </storeUsage>
                 <tempUsage>
                     <tempUsage limit="2 gb"/>
                 </tempUsage>
             </systemUsage>
         </systemUsage>

         <transportConnectors>
             <transportConnector name="openwire" 
uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
         </transportConnectors>

         <shutdownHooks>
             <bean xmlns="http://www.springframework.org/schema/beans" 
class="org.apache.activemq.hooks.SpringContextHook" />
         </shutdownHooks>

     </broker>

Any ideas?

regards,

-- 
--
François


Re: [activemq-classic] Clean up scheduler not working on all messages in DLQ

Posted by Francois Papon <fr...@openobject.fr>.
Hi JB,

Yes these messages has been redelivered befor moving to the DLQ.

regards,

François

On 08/09/2023 16:46, Jean-Baptiste Onofré wrote:
> Hi,
>
> The messages have been redelivered before moving to the DLQ ?
>
> Regards
> JB
>
> On Wed, Sep 6, 2023 at 9:08 AM fpapon <fp...@apache.org> wrote:
>> Hi,
>>
>> I have an ActiveMQ (5.16.2/JDK11) broker with persistence message (kahadb).
>>
>> We are using a deadletter strategy to clean messages older than 7 days
>> but we can see that some of the older message are not clean up and we
>> don't have any error/warning message in the logs...
>>
>> Here the config.xml of the broker:
>>
>> <broker xmlns="http://activemq.apache.org/schema/core"
>>               brokerName="localhost"
>>               dataDirectory="${activemq.data}"
>>               schedulerSupport="true"
>>               useJmx="true">
>>
>>           <destinationPolicy>
>>               <policyMap>
>>                 <policyEntries>
>>                     <policyEntry queue=">" queuePrefetch="500">
>>                         <deadLetterStrategy>
>>                             <sharedDeadLetterStrategy
>> expiration="604800000"/> <!-- 7 days -->
>>                         </deadLetterStrategy>
>>                         <pendingMessageLimitStrategy>
>>                             <constantPendingMessageLimitStrategy
>> limit="1000"/>
>>                         </pendingMessageLimitStrategy>
>>                     </policyEntry>
>>
>>                     <policyEntry topic=">" >
>>                     <pendingMessageLimitStrategy>
>>                       <constantPendingMessageLimitStrategy limit="1000"/>
>>                     </pendingMessageLimitStrategy>
>>                   </policyEntry>
>>                 </policyEntries>
>>               </policyMap>
>>           </destinationPolicy>
>>
>>           <managementContext>
>>               <managementContext createConnector="false"/>
>>           </managementContext>
>>
>>           <persistenceAdapter>
>>               <kahaDB directory="${activemq.data}/kahadb"
>>                       indexWriteBatchSize="1000"
>>                       indexCacheSize="2000"
>>                       journalMaxFileLength="5mb"
>>                       checkForCorruptJournalFiles="true"
>>                       ignoreMissingJournalfiles="true"
>>                       maxAsyncJobs="5000"
>>                       concurrentStoreAndDispatchQueues="true"
>>                       concurrentStoreAndDispatchTopics="true"
>>                       enableJournalDiskSyncs="true"
>>                       enableIndexWriteAsync="true"/>
>>           </persistenceAdapter>
>>
>>           <systemUsage>
>>               <systemUsage sendFailIfNoSpace="true">
>>                   <memoryUsage>
>>                       <memoryUsage percentOfJvmHeap="70" />
>>                   </memoryUsage>
>>                   <storeUsage>
>>                       <storeUsage limit="85 gb"/>
>>                   </storeUsage>
>>                   <tempUsage>
>>                       <tempUsage limit="2 gb"/>
>>                   </tempUsage>
>>               </systemUsage>
>>           </systemUsage>
>>
>>           <transportConnectors>
>>               <transportConnector name="openwire"
>> uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
>>           </transportConnectors>
>>
>>           <shutdownHooks>
>>               <bean xmlns="http://www.springframework.org/schema/beans"
>> class="org.apache.activemq.hooks.SpringContextHook" />
>>           </shutdownHooks>
>>
>>       </broker>
>>
>> Any ideas?
>>
>> regards,
>>
>> --
>> --
>> François
>>

Re: [activemq-classic] Clean up scheduler not working on all messages in DLQ

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

The messages have been redelivered before moving to the DLQ ?

Regards
JB

On Wed, Sep 6, 2023 at 9:08 AM fpapon <fp...@apache.org> wrote:
>
> Hi,
>
> I have an ActiveMQ (5.16.2/JDK11) broker with persistence message (kahadb).
>
> We are using a deadletter strategy to clean messages older than 7 days
> but we can see that some of the older message are not clean up and we
> don't have any error/warning message in the logs...
>
> Here the config.xml of the broker:
>
> <broker xmlns="http://activemq.apache.org/schema/core"
>              brokerName="localhost"
>              dataDirectory="${activemq.data}"
>              schedulerSupport="true"
>              useJmx="true">
>
>          <destinationPolicy>
>              <policyMap>
>                <policyEntries>
>                    <policyEntry queue=">" queuePrefetch="500">
>                        <deadLetterStrategy>
>                            <sharedDeadLetterStrategy
> expiration="604800000"/> <!-- 7 days -->
>                        </deadLetterStrategy>
>                        <pendingMessageLimitStrategy>
>                            <constantPendingMessageLimitStrategy
> limit="1000"/>
>                        </pendingMessageLimitStrategy>
>                    </policyEntry>
>
>                    <policyEntry topic=">" >
>                    <pendingMessageLimitStrategy>
>                      <constantPendingMessageLimitStrategy limit="1000"/>
>                    </pendingMessageLimitStrategy>
>                  </policyEntry>
>                </policyEntries>
>              </policyMap>
>          </destinationPolicy>
>
>          <managementContext>
>              <managementContext createConnector="false"/>
>          </managementContext>
>
>          <persistenceAdapter>
>              <kahaDB directory="${activemq.data}/kahadb"
>                      indexWriteBatchSize="1000"
>                      indexCacheSize="2000"
>                      journalMaxFileLength="5mb"
>                      checkForCorruptJournalFiles="true"
>                      ignoreMissingJournalfiles="true"
>                      maxAsyncJobs="5000"
>                      concurrentStoreAndDispatchQueues="true"
>                      concurrentStoreAndDispatchTopics="true"
>                      enableJournalDiskSyncs="true"
>                      enableIndexWriteAsync="true"/>
>          </persistenceAdapter>
>
>          <systemUsage>
>              <systemUsage sendFailIfNoSpace="true">
>                  <memoryUsage>
>                      <memoryUsage percentOfJvmHeap="70" />
>                  </memoryUsage>
>                  <storeUsage>
>                      <storeUsage limit="85 gb"/>
>                  </storeUsage>
>                  <tempUsage>
>                      <tempUsage limit="2 gb"/>
>                  </tempUsage>
>              </systemUsage>
>          </systemUsage>
>
>          <transportConnectors>
>              <transportConnector name="openwire"
> uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
>          </transportConnectors>
>
>          <shutdownHooks>
>              <bean xmlns="http://www.springframework.org/schema/beans"
> class="org.apache.activemq.hooks.SpringContextHook" />
>          </shutdownHooks>
>
>      </broker>
>
> Any ideas?
>
> regards,
>
> --
> --
> François
>