This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Wanted: Recommendation for (JMS?) Message Queues Frameworks  RSS feed

 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I want to write a prototype/proof-of-concept application that implements a (cygwin) bash execution queue server (and client) with a throttle so only one queue entry (job) gets executed at a time.

I know that this is a common feature in build environments but I need some simple source code as a starting point for some fancier enhancements.

What do you recommend? JMS via Spring or JMS via EJB? Do you like JMS?

How do I implement that throttle? Is this a feature of JMS or the implementation?
I also need to be able to enumerate entries in the queue and cancel (remove) some entries before they start execution.
And I need to be able to pause the queue so it does not remove the next entry and start execution.

So there is ActiveMQ, RabbitMQ, AMQ and others... Which have the features I need?
This needs to run on Linux and Windows...
Having a queue that can survive reboots would be nice too.
That is all the requirements I can think of right now...

Thanks,
Siegfried
 
K. Tsang
Bartender
Posts: 3624
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What make you think JMS is a good option?

If you going about some sort of job batch controller app or the link, the job info can be stored in a database table and load into a list or some other collection when program runs.

Regarding surviving reboots, JMS can do that when you mean the jobs inside the queue not yet processed. The running job if any will definitely fail.

The non-JMS approach I can think of is ExecutorService. That allow you to control whether the "executor" acts as a sequential queue or running parallel jobs

For JMS, I just know Spring uses ActiveMQ as its MQ implementation. You may want to explore other MQ software at http://queues.io

If you use oracle DB, you can even consider Oracle Advanced Queue that comes with the DB.
 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like this link and the code works:
https://www.ivankrizsan.se/2016/02/22/running-an-activemq-broker-with-maven/

After google searching "ActiveMQ Throttle" I was surprised that normally this means throttling the producer (or even the TCP connection) and that is not what I want.

So let me restate my question:
Does ActiveMQ have a feature to throttle consumers so that only one message total is received and processed at a time? In the case of throttling for Microsoft's WCF/MSMQ, you need to specify the maximum concurrent instances, concurrent sessions, and concurrent calls (of the consumer) to be one. This is what I want in a java based application.

After reading this link, I think the answer is no:  http://activemq.2283324.n4.nabble.com/Consumer-throttling-td4706685.html

If this is true, can someone recommend a java/groovy friendly message queue API or framework that does implement this kind of throttling?
From more google searching, it does not look like RabbitMQ supports this either. Strange. This is a feature of the Microsoft's WCF/MSMQ application I'm trying to port to an OS neutral implementation and I'm surprised to be having difficulty finding this feature in the java world.

Thanks
Siegfried


 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darn! Where is that edit button?

Regarding "Why do I think JMS is a good option"?  I assumed it was. Clearly AMPQ has some additional features.

Regarding that queue.io link: Wow! that is a lot of options! I like ActiveMQ because I can download and install and execute with Maven easily on my local PC.

    Can I have some help selecting one that something similar that has the kind of throttle I described above?

Thanks!

Siegfried
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!