Spring DMLC + Message Batch + DB update
I have a stand alone DMLC consumer listening to an activemq JMS broker, and badly need your help to achieve the following in Spring DMLC consumer. here's what I am trying to achieve
1. Need to facilitate the local transaction to group/batch the messages which are getting received i.e similar to MessageConsumer.receive(MILLISECOND) , so all messages getting received in the specified time out or a specified max count should be able to transacted together, hence will be acknowledged once all messages in the group has become successful.
2. From the same consumer, I need to push all these messages to DB, so primarily to avoid flooding the DB server with so many Inserts, I might need to insert/update those messages as batchinsert or update.
3. So primarily need a mechanism to specify the programmatic transaction boundaries and etc.
I think by default DMLC invokes MessageConsumer.receive() method in a loop, so that the messages will get consumed as it arrives. As I know that it's possible to group the messages as it arrives using local transaction and etc, need your help to understand the configuration in spring.
Any sort of help will be deeply appreciated, and I am trying different combinations too.