You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by milan tomic <to...@yahoo.com> on 2009/05/20 13:22:48 UTC

Batch processing

Howdy,

I have this case:

For each message that comes, I have to insert an record into MY_LOG table
and to make commit. Commits slows my DB, so I have decided to use MQ. The
question is: does MQ supports batch processing of messages? Can I say: give
me 50 messages from the queue at once, so I would make 50 INSERTs into DB
and ony 1 commit? Which is the best way to do this?

Thank you in advance,
Milan
-- 
View this message in context: http://www.nabble.com/Batch-processing-tp23633548p23633548.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Batch processing

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

you can use JMS transactions and commit them after you commit your DB.

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Wed, May 20, 2009 at 1:22 PM, milan tomic <to...@yahoo.com> wrote:

>
> Howdy,
>
> I have this case:
>
> For each message that comes, I have to insert an record into MY_LOG table
> and to make commit. Commits slows my DB, so I have decided to use MQ. The
> question is: does MQ supports batch processing of messages? Can I say: give
> me 50 messages from the queue at once, so I would make 50 INSERTs into DB
> and ony 1 commit? Which is the best way to do this?
>
> Thank you in advance,
> Milan
> --
> View this message in context:
> http://www.nabble.com/Batch-processing-tp23633548p23633548.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>