As Taarriq said, this is a question for ActiveMQ, but having dealt with a
similar problem recently here's some pointers:


http://activemq.2283324.n4.nabble.com/KahaDB-vs-LevelDB-td4706599.html#a4706648

http://activemq.apache.org/kahadb.html#KahaDB-Multi(m)kahaDBPersistenceAdapter

Cheers
Doug

On Mon, Jun 5, 2017 at 3:40 AM, Taariq Levack <taar...@gmail.com> wrote:

> Hi
> This is really an activemq question, but the short answer is to clear the
> DLQ periodically.
>
> Cheers
>
> On 05 Jun 2017 09:54, "tnk" <jus...@gmail.com> wrote:
>
> > Hi,
> >
> >  i have simple camel route, which reads from activemq queue and sends
> email
> > messages, if exception occurs message is moved to dead letter queue. The
> > problem is, store percent usage is very high. 10 messages in DLQ consumes
> > 30% store (limit for storage is 1 gb), it is ~30mb for one message, but
> the
> > message is really small (about 250 text characters in the body).
> >
> > Any ideas why and how to fix this?
> >
> > Using servicemix v5.3.1, camel v2.13.3, active mq 5.10.0. CentOS 6.6.
> >
> > camel context:
> > <camelContext id="email-camel-context"
> > xmlns="http://camel.apache.org/schema/spring";>
> >
> >         <endpoint id="smtpEndpoint"
> > uri="smtp://${smtp.host}:${smtp.port}?from=${from.email}&
> > amp;contentType=${content.type}"
> > />
> >
> >         <camel:route id="email-sending-route" errorHandlerRef="
> > mailErrorHandler">
> >                 <camel:from uri="amq:queue:email.outgoing?
> disableReplyTo=true"
> > />
> >                 <camel:transacted ref="requires_new" />
> >                 <camel:setExchangePattern pattern="InOnly" />
> >                 <camel:removeHeaders pattern="JMS*" />
> >                 <log message="Sending email message to ${header.to}"
> > loggingLevel="INFO"
> > logName="log.integration.email"/>
> >
> >                 <camel:doTry>
> >                         <camel:to ref="smtpEndpoint" />
> >                         <camel:doCatch>
> >                                 <camel:exception>java.lang.
> > Exception</camel:exception>
> >                                 <camel:handled><camel:
> > constant>false</camel:constant></camel:handled>
> >                                 <log message="Sending email message to ${
> > header.to} FAILED."
> > loggingLevel="ERROR" logName="log.integration.email"/>
> >                                 <camel:rollback markRollbackOnly="true"
> />
> >                         </camel:doCatch>
> >                 </camel:doTry>
> >         </camel:route>
> > </camelContext>
> >
> > <bean id="mailErrorHandler"
> > class="org.apache.camel.builder.DeadLetterChannelBuilder">
> >         <property name="deadLetterUri" value="jms:queue:email.
> outgoing.dlq"
> > />
> >         <property name="redeliveryPolicy" ref="emailRedeliveryConfig" />
> > </bean>
> >
> > <bean id="emailRedeliveryConfig"
> > class="org.apache.camel.processor.RedeliveryPolicy">
> >         <property name="maximumRedeliveries" value="3"/>
> >         <property name="redeliveryDelay" value="5000"/>
> > </bean>
> >
> > <bean id="requires_new"
> > class="org.apache.camel.spring.spi.SpringTransactionPolicy">
> >         <property name="transactionManager" ref="jmsTransactionManager"
> />
> >         <property name="propagationBehaviorName"
> > value="PROPAGATION_REQUIRES_NEW"
> > />
> > </bean>
> >
> > <bean id="amq"
> > class="org.apache.activemq.camel.component.ActiveMQComponent">
> >         <property name="connectionFactory" ref="jmsConnectionFactory" />
> >         <property name="transacted" value="true" />
> >         <property name="transactionManager" ref="jmsTransactionManager"/>
> >         <property name="configuration" ref="jmsConfig" />
> > </bean>
> >
> > <bean id="jmsTransactionManager"
> > class="org.springframework.jms.connection.JmsTransactionManager">
> >         <property name="connectionFactory" ref="jmsConnectionFactory" />
> > </bean>
> >
> > <bean id="shutdown" class="org.apache.camel.impl.
> DefaultShutdownStrategy">
> >         <property name="timeout" value="30" />
> > </bean>
> >
> > <bean id="jmsConnectionFactory"
> > class="org.apache.activemq.ActiveMQConnectionFactory">
> >         <property name="brokerURL" value="${activemq.broker.url}" />
> >         <property name="userName" value="${activemq.user}" />
> >         <property name="password" value="${activemq.password}" />
> >         <property name="watchTopicAdvisories" value="false" />
> > </bean>
> >
> > <bean id="pooledConnectionFactory"
> > class="org.apache.activemq.pool.PooledConnectionFactory"
> > init-method="start"
> > destroy-method="stop">
> >         <property name="maxConnections" value="2" />
> >         <property name="connectionFactory" ref="jmsConnectionFactory" />
> > </bean>
> >
> > <bean id="jmsConfig"
> > class="org.apache.camel.component.jms.JmsConfiguration">
> >         <property name="connectionFactory" ref="pooledConnectionFactory"
> />
> >         <property name="transacted" value="true" />
> >         <property name="concurrentConsumers" value="1" />
> >         <property name="deliveryPersistent" value="true" />
> >         <property name="requestTimeout" value="10000" />
> >         <property name="cacheLevelName"  value="CACHE_CONSUMER" />
> > </bean>
> >
> >
> >
> > --
> > View this message in context: http://camel.465427.n5.nabble.
> > com/activemq-store-percent-is-very-high-tp5801821.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>

Reply via email to