NMS-8099: MailTransportMonitor steps all over itself #8212
+19
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Typing up a very old loose end...
When multiple nodes have a configured MailTransportMonitor service all sharing the same destination mailbox, the email subject is not sufficiently unique and collides with emails from other nodes. The deletion logic will then delete emails that actually belong to other pollers, causing those services to be marked down. This change tacks the nodeId of the polled node onto the subject and the MTM header, keeping each node's subjects distinct, so they will not collide and step on each other's test emails.
This is probably extremely low risk - I don't think the MailTransportMonitor has many (or maybe any) users. (hello, fellow graybeards, here wondering why your MTM subjects changed!)
Ancient history trivia - this was the first time I ever attempted to write Java, and might be the first jira issue I ever created. I ran this modification in production, monitoring mail transport latency between internal Exchange servers in different countries.
All Contributors
External References