Email Engine architecture


Email Engine consists of multiple modules that run in threads. All the modules are designed to be thread safe, and to increase speed and scalability. The following image shows the Email Engine architecture:

221_Email Engine architecture.png

Email Engine modules

The Email Engine includes the following modules:

Module

Description

Monitor

Monitors the mailbox for statistical information such as when the connection dropped and the length of time the connection was down.

Receiver

Runs in separate threads to maximize speed and reliability.

  • Reads incoming mails from the mail server.
  • Creates entries in AR System Email Messages form.
  • Adds messages to the message queue.

Execution

Parses and executes messages in the message queue.

Creator

Creates an email based on a template and the data it retrieves from AR System.

  • Monitors the AR System Email Messages form for outgoing messages.
  • Formats messages to be sent.

Sender

Runs as a separate thread, and sends formatted messages to the mail server.

Logging

Logs messages, error messages, and warnings to the AR System Email Errors form or local file.

Configuration

Synchronizes configuration information for the Email Engine by using the Centralized Configuration of AR System.

All modules run as separate threads. An incoming mailbox uses two threads to process email in the message queue—the Receiver and Execution modules. An outgoing mailbox uses separate threads running for the Creator and Sender modules to format and send outgoing messages.

You can specify various troubleshooting parameters, for example, the queue size of email messages or how detailed you want to log information within a module. For more information, see Debugging-options-for-the-Email-Engine and Updating-the-Email-Engine-settings-by-using-the-Centralized-Configuration.

Threading model for outgoing mailboxes

The Sender and Creator threads for every outgoing mailbox depend upon the value set for the NumberOfSenderThreads property and the number of configured outgoing mailboxes, respectively.

Depending upon the NumberOfSenderThreads value and the number of configured outgoing mailboxes, a connection pool is created. The Sender thread uses the connections from this connection pool to send the outgoing messages. The number of connections for each configured outgoing mailbox depends on the number of Sender threads.

The following figure explains this concept in detail:

221_Email architecture_threading module.png

As shown in the figure, there are three configured outgoing mailboxes, and the value of NumberOfSenderThreads is assumed to be 2. Consequently, two Sender threads and a connection pool with six connections, that is two connections for every mailbox, is created. The Sender threads send the outgoing messages from the common message queue created for the three Creator threads by using the connections from this connection pool.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*