Announcement Announcement Module
Collapse
No announcement yet.
concurrent message sending Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • concurrent message sending

    Hi,
    Using Spring JMS, I would like to send message concurrently using multiple threads. Is there a direct solution to this or any reference/sample?

  • #2
    use jmstemplate.execute()

    you could use jmstemplate.execute(...) .

    Comment


    • #3
      You also might want to take a look at Spring Integration: http://www.springsource.org/spring-integration

      The outbound JMS Channel Adapter can be connected to any channel, including one that is backed by a configurable Executor. That also provides the added benefit of not requiring a JmsTemplate dependency in your code (e.g. you can define your own gateway interface with no dependencies).

      Can you describe your use-case in a bit more detail, specifically what is upstream from the point in your code where you will be sending messages?

      Comment


      • #4
        Hi!

        BTW: does it really make sense to do that concurrently? JMS (or any other messaging architecture) especially designed to distribute program units (Producer and Consumer). In your case Producer on send just places a Message into Destination and that's all - it ready to do something else.
        Do you really think, that adding concurrent senders give you benefits?

        New architectures more and more try to escape from multithreading: http://martinfowler.com/articles/lmax.html, http://blog.springsource.org/2013/05...ons-on-the-jvm

        Cheers,
        Artem

        Comment


        • #5
          Requirement

          Fetch from db, generate XML and send message to TIBCO EMS. Expected transactions per second is 200. Kindly suggest.

          Comment

          Working...
          X