hi,

Currently mail transport uses the Axis2 message context ID as the mail
message ID if it has set.

// if a custom message id is set, use it
        if (msgContext.getMessageID() != null) {
            message.setHeader(MailConstants.MAIL_HEADER_MESSAGE_ID,
msgContext.getMessageID());
            message.setHeader(MailConstants.MAIL_HEADER_X_MESSAGE_ID,
msgContext.getMessageID());
        }

In RM retransmit scenarios this cause an issue. For retransmissions all the
messages have the same msgContext.getMessageID().
Hence they have the same mail message ID as well. Since synchronous mail
transport use this ID to identify the response it is not possible
to match the response and request messages.

Usage of one message ID make only one entry for call back table and hence
after first message arrives others can not be dispatched.

On the other hand I think there is no any particular reason to use same
message ID even in the synapse point of view.
So shall I remove the above lines of code so that it generates a unique mail
message ID for each message?

thanks,
Amila.


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to