[ 
https://issues.apache.org/jira/browse/JAMES-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534591#comment-16534591
 ] 

ASF GitHub Bot commented on JAMES-2301:
---------------------------------------

Github user nstdio commented on a diff in the pull request:

    https://github.com/apache/james-project/pull/123#discussion_r200590855
  
    --- Diff: 
server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
 ---
    @@ -297,27 +303,20 @@ protected void produceMail(Map<String, Object> props, 
int msgPrio, Mail mail) th
             props.put(JAMES_MAIL_MESSAGE_SIZE, mail.getMessageSize());
             props.put(JAMES_MAIL_NAME, mail.getName());
     
    -        StringBuilder recipientsBuilder = new StringBuilder();
    -
    -        Iterator<MailAddress> recipients = mail.getRecipients().iterator();
    -        while (recipients.hasNext()) {
    -            String recipient = recipients.next().toString();
    -            recipientsBuilder.append(recipient.trim());
    -            if (recipients.hasNext()) {
    -                recipientsBuilder.append(JAMES_MAIL_SEPARATOR);
    -            }
    +        // won't serialize the empty headers so it is mandatory
    --- End diff --
    
    The empty `PerRecipientHeaders` will cost us a `303` bytes and once we 
hexing it'll double it's size, so I think it'll way much better to not sent 
anything instead of pay additional bytes for just empty object. Generally 
speaking this little optimization intended to decrease number of bytes sent 
over the wire.


> JMS mail queue do not preserve per-recipient headers
> ----------------------------------------------------
>
>                 Key: JAMES-2301
>                 URL: https://issues.apache.org/jira/browse/JAMES-2301
>             Project: James Server
>          Issue Type: Bug
>          Components: Queue
>    Affects Versions: master
>            Reporter: Tellier Benoit
>            Priority: Major
>             Fix For: master
>
>
> The JMS mail queue reset this email field.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to