0 Replies Latest reply on Jul 21, 2010 10:53 AM by Leon Doud

    Message Multicaster - Send the message or a copy?

    Leon Doud Newbie

      MessageMulticaster.java has a method called sendToSubset that sends the message received to a list of recipient services. When using the InVm option to asynchronously deliver the message I believe this causes the recipient services to receive a reference to the actual message object. This sharing of references to the same message object by multiple services (and therefore multiple threads) causes the contents of the message (especially the default message location) to become unpredictable.

       

      I wanted to discuss this here before opening an issue in JIRA. My suggestion would be to add a configuration option on the actions that use MessageMulticaster to send a copy of the message instead of the actual message. By default the option would be off to keep functionality consistent with the previous behavior.