activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: On-disk persisted message queues on consumer failure
Date Thu, 11 Oct 2012 13:02:18 GMT
So it sounds like the camel route is consuming from an activemq queue and
dumping to DB. And then when the DB goes down, the camel route is consuming
them and holding them in memory (since the DB is down)? Or it's not
consuming them and they're getting queued up in the broker?

On Thu, Oct 11, 2012 at 5:17 AM, guerra <jg.guerra@gmail.com> wrote:

> Hi,
>
> I've a ActiveMQ broker to insert messages into the Oracle database. I have
> a
> working version with a JDBC camel component and it is inserting messages
> into it. So, no problems so far.
>
> Now the scenario is, JMS messages have the PERSISTED flag enabled, KahaDB
> is
> also setup and apparently messages are persisted (rotate the log files
> looks
> ok), but when I shutdown the database, the broker basically queue the
> messages on memory rather than disk. Is there any way to enable the way to
> dump messages to disk instead?.
>
> Does it cover this link http://activemq.apache.org/persistence.html the
> scenario I described before?
>
>
> ###################### activemq.xml ##############################
> <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="telemetry" persistent="true"
> dataDirectory="${activemq.base}/data"
> destroyApplicationContextOnStop="true">
>
>  <destinationPolicy>
>             <policyMap>
>               <policyEntries>
>                 <policyEntry memoryLimit="1mb" producerFlowControl="false"
> topic="&gt;">
>                   <pendingSubscriberPolicy>
>                     <vmCursor/>
>                   </pendingSubscriberPolicy>
>                 </policyEntry>
>                 <policyEntry memoryLimit="1mb" producerFlowControl="false"
> queue="&gt;">
>
>                   <pendingQueuePolicy>
>                     <fileQueueCursor/>
>                   </pendingQueuePolicy>
>                 </policyEntry>
>               </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
>
>  <managementContext>
>             <managementContext createConnector="false"/>
>         </managementContext>
>  <persistenceAdapter>
>             <kahaDB directory="/opt/shared/telemetry/data/kahadb"
> journalMaxFileLength="1mb"/>
>         </persistenceAdapter>
>
>  <systemUsage>
>             <systemUsage>
>                 <memoryUsage>
>                     <memoryUsage limit="64 mb"/>
>                 </memoryUsage>
>                 <storeUsage>
>                     <storeUsage limit="5 gb"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="1 gb"/>
>                 </tempUsage>
>             </systemUsage>
>         </systemUsage>
>  <transportConnectors>
>             <transportConnector name="openwire" uri="tcp://0.0.0.0:40000"
> updateClusterClients="true"/>
>         </transportConnectors>
>
> </broker>
>
> ###################### camel.xml ##############################
> <route>
>                 <from uri="activemq:queue:ntcs.telemetry.in"/>
>                 <to uri="seda:jdbc.queue"/>
> </route>
> <route>
>                 <description>NTCS JDBC internal queue</description>
>                 <from uri="seda:jdbc.queue"/>
>                 <split>
>                         <xpath>/ntcs-telemetry/telemetry</xpath>
>                         <bean ref="insertTelemetry"/>
>                         <to uri="jdbc:oracle-ds"/>
>                 </split>
> </route>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/On-disk-persisted-message-queues-on-consumer-failure-tp4657706.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message