When is messaging (e.g. JMS) an alternative for multithreading?

前端 未结 6 2132
北恋
北恋 2021-01-05 15:13

I work on a data processing application in which concurrency is achieved by putting several units of work on a message queue that multiple instances of a message driven bean

6条回答
  •  Happy的楠姐
    2021-01-05 15:32

    Performance-wise multi-threading should be faster than any messaging, because you add an additional network layer with messaging.
    Application-wise messaging helps you to avoid locking and data sharing issues as there is no common object.
    From a scaling perspective messaging is a lot better as you can configure just more nodes on several server by configuring the message service instead of changing the application.

提交回复
热议问题