简体   繁体   中英

reading messages from MQ using java

I need some design and developments inputs on reading messages from queue. i have following requirements and constraints

  1. i need read message from queue and inert to db.

  2. messages can come at any interval (100's at same time or 1 by one with few mins gap)

  3. don't have any MDB container to host (just plain tomcat server)

  4. Need to write java application to perform the above.

so not very sure how to put this simple application.

  1. if is use quartz scheduler to trigger job to read all messages in the queue then not sure before even that complete next instance of scheduler might start and create problem.

please suggest me any inputs.

this is basically some utility so i don't want to spend too long time nor too much resources on this.

thanks & regards

LR

The usage of an ESB like Mule or Camel would simplify a lot your development. You'd find already developed components (called endpoints) for reading from a queue, and writing into a db. Also for scheduling jobs with quartz.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM