I read a blog, and one of the points was βif you use queues, you messed up,β in the context of JMS.
I thought we even need JMS? A simple alternative would be if you need to do something asynchronously, why not just put the job request in a table somewhere and run some db polling process every X time units looking for new jobs?
This approach is simpler than JMS, it is easy to understand and basically removes application dependency.
What do I lose if I use the alternative that I described? Perhaps someone loses the ability to use JMX to administer things, but if your job queue is βloadedβ from a table, you can write simple code to βmanageβ the processing.
I read a blog, and one of the points was "if you use queues, you messed up," in the context of JMS.
This is simply wrong.
You may be mistaken when choosing to use a queue when this is not appropriate, but if it is a JMS, this is a great choice.
I would be more attentive to what I read on the Internet if I were you. It seems to me that the author liked to make inflammatory statements in order to revitalize his blog and raise his Google Analytics statistics. This is one opinion of man, nothing more.
The survey solution is more complex, wasteful CPU cycles, but not real time, in my opinion.
You can use Executor or FutureTask if you want asynchronous processing. These would be reasonable queue alternatives if asynch is all you need.
, . JMS - , , , . , . : http://java-source.net/open-source/job-schedulers
java.util.concurrent.
, , ( ) , .
JMS- .
( JMS) - , , . , " ", . . , , , .
( ). " " .
1) " ", , "done" ( ). 2) - , "" , "" . , " " , , , "" , .
, , , . "job submiter" "job processor" , . " " ( , , , ), , "" .
JMS .
, , . - .
, JMS, .
, , . , , " ".
(, JMS) - 1M msgs/sec, : , . , 2 , 3 , 4 ..
Source: https://habr.com/ru/post/1791109/More articles:Django admin site: how does the "Add User" page work (more fields when editing)? - djangoHow to create a fully customizable / shared LINQ to SQL database connection? - visual-studio-2010Why is UIDeviceOrientationDidChangeNotification not always registered? - cocoa-touchUnified way to close browser window in JavaScript? - javascriptCocoa - Custom NSStatusItem appearance in the menu bar - cocoaHTML canvas displays text slightly different than browsers - javascriptjQuery div position in the middle of the page - jquery.NET Framework and Version Compatibility - .netsetting the activerecord attribute based on virtual attributes - ruby-on-railsC # - How can I get a language name from a language code? - c #All Articles