-
1. Re: does activemq have a way to pick entries from db table & insert into queue
davsclaus Dec 10, 2012 5:20 AM (in response to kmohite)Yes
You can use Apache Camel which is provided out of the box with ActiveMQ. Then you can create a little Camel route, that looks for new records in the DB table. And then prepare the data, and send it to a JMS queue.
With Camel you have a number of components to use for database integration. Such as JPA, or MyBatis
http://camel.apache.org/mybatis
When a new row is inserted in the table. How should Camel know this? Would it be that the row is deleted when it has been sent to the JMS queue? Or do you have a column that has a status flag, to tell if it has been sent or not? You would need to give some thoughts about this.
There is also a plain SQL component
And then you can use Java code to prepare the data, or any of the data formats Camel provides
http://camel.apache.org/data-format.html
And then send the data using the activemq component
http://camel.apache.org/activemq
To get your head around Apache Camel then I suggest to read this article first.
http://java.dzone.com/articles/open-source-integration-apache