You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For our email sending, we have noticed that the latency is being dominated by the outgoing SMTP send. We are currently using the simple-java-mail library, but are considering evaluating https://github.com/HubSpot/NioSmtpClient so that we can optimize the SMTP connection by taking advantage of it's pipelining feature.
Interesting, I had never heard of pipelining before...
That said, have you looked into using Simple Java Mail's batch-module? With it you get a connection pool with reusable Transport connections that don't close. Even having a pool of one connection that doesn't close can double your performance as up to half of the time spent on sending an email is simply opening up a Transport connection.
Regarding adding pipelining support: At first glance, as Simple Java Mail builds upon Jakarta Mail (previously JavaMail), it seems impossible to configure support at this level. Simple Java Mail doesn't handle the actually server commands such as EHLO and Jakarta Mail has no support for pipelining, and looking around a bit, it doesn't seem to be on the radar either (can barely find any documentation on it, their bug tracker returns zilch and so do the mailing list and forums).
I'll do a bit more research, but I'm afraid I'll have to wait for Jakarta to make a move here.
We haven't had the capacity to fix it yet. I've changed teams as well. I'll let them know they can follow up here if necessary. Feel free to close the issue if you'd like.
I haven't worked on the announcements team for almost two years and have left the company as well. I'd refer you to Zubair Khan who is the current lead on the team, but i don't see him on LinkedIn and have no way to contact him otherwise.
Activity
bbottema commentedon Mar 23, 2021
Interesting, I had never heard of pipelining before...
That said, have you looked into using Simple Java Mail's batch-module? With it you get a connection pool with reusable Transport connections that don't close. Even having a pool of one connection that doesn't close can double your performance as up to half of the time spent on sending an email is simply opening up a Transport connection.
bbottema commentedon Mar 23, 2021
Regarding adding pipelining support: At first glance, as Simple Java Mail builds upon Jakarta Mail (previously JavaMail), it seems impossible to configure support at this level. Simple Java Mail doesn't handle the actually server commands such as EHLO and Jakarta Mail has no support for pipelining, and looking around a bit, it doesn't seem to be on the radar either (can barely find any documentation on it, their bug tracker returns zilch and so do the mailing list and forums).
I'll do a bit more research, but I'm afraid I'll have to wait for Jakarta to make a move here.
t101jv commentedon Mar 23, 2021
That should be fine, we are going to try tuning our connection pool size and lifecycle and see where that gets us.
bbottema commentedon Apr 10, 2021
Any update on your performance?
t101jv commentedon Apr 11, 2021
We haven't had the capacity to fix it yet. I've changed teams as well. I'll let them know they can follow up here if necessary. Feel free to close the issue if you'd like.
bbottema commentedon Apr 11, 2021
In that case I'll close the issue until further notice. But looking forward to your performance update.
bbottema commentedon Feb 8, 2023
If you know more by now, I'm still curious as to your findings.
t101jv commentedon Feb 8, 2023
I haven't worked on the announcements team for almost two years and have left the company as well. I'd refer you to Zubair Khan who is the current lead on the team, but i don't see him on LinkedIn and have no way to contact him otherwise.
bbottema commentedon Aug 9, 2026
WIll be continued in #699.