james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-2301) JMS mail queue do not preserve per-recipient headers
Date Fri, 06 Jul 2018 08:57:00 GMT

    [ 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message