How the Mailcaster Works

This section provides an overview of the basic operation of the Mailcasters, and discusses:

  • The mail queue.

  • Job types.

  • How job size is determined.

  • Job assignment priority.

  • Mail job states.

Mail jobs are placed in the mail queue by the Online Marketing Dialog Server (also called the DES). When a Mailcaster is started, it immediately checks the mail queue for jobs that match its configuration. If it finds such a job, it handles the job (either by processing the entire job or by taking a smaller piece of it to process, depending on how it is configured) and then checks back with the queue for another job. If it does not find a job that matches its configuration (for example, if it is a Small Job Only Mailcaster and the queue contains only large jobs) it will go to sleep for one minute, then wake up and check again. It will continue this process until an appropriate job becomes available.

If multiple Mailcasters have been configured, each one goes through the same process of checking the queue and taking a job that most closely matches its particular configuration. If more than one such job exists at the time a Mailcaster checks the queue, it will by default take the oldest available job (the one that has been on the queue the longest) to process.

Each time a Mailcaster finishes processing a job, it becomes available and immediately checks the queue again for a new job.

Mailcasters handle three types of jobs:

  • Parent jobs

  • Child jobs

  • Small jobs

A parent job is a mail job that is divided into smaller jobs, which are then handled by Mailcasters. Parent jobs are by definition large mail jobs (that is, jobs larger than the smallAudienceThreshold parameter).

A child job is a subset of a parent job—each parent job can have two or more child jobs, with the actual number determined by the interaction of the following factors:

  • The size of the parent job

  • The percentageJobSize parameter

  • The maxJobSize parameter

  • The minJobSize parameter

Refer to Mailcaster Configuration Parameter Reference on page 17 for a description of the configuration parameters, and to How Job Size is Determined on page 4 for information on job sizes.

A small job is a mail job that contains fewer records than the value of the smallAudienceThreshold parameter. Small jobs are handled as single jobs and are not broken into child jobs.

Job size refers to the size of a “chunk” of emails a given Mailcaster will accept for processing. In the case of a small job (a job containing fewer emails than specified by the smallAudienceThreshold configuration parameter), a Mailcaster takes the entire job and processes it as a single entity. In the case of larger jobs, these jobs are divided into smaller “child” jobs and processed by different Mailcasters. In this way, a Mailcaster that has finished processing a job can obtain another job from the queue and continue processing rather than being forced to remain idle until all the other jobs have finished.

The configuration parameters that govern job size are smallAudienceThreshold, minJobSize, maxJobSize, and percentageJobSize.

Mailcasters of type Small Job Only will only accept jobs where is_small_job is set to ‘y’. This is done during deduping by the DES when the job size is less than the smallAudienceThreshold used by the DES. Note that smallAudienceThreshold can be set for each Mailcaster.

For large jobs, the Mailcaster (of type Large Job Priority or of Small Job Priority if no small jobs are in the queue) divides the job up into smaller “child” jobs using the following guidelines:

  1. First it looks at the overall job size. If the entire job fits within the range specified by minJobSize and maxJobSize, it divides the job into a single child job. For example, if the job size is 2112 emails, minJobSize is set to 2000, and maxJobSize is set to 10000, this job falls in the range of 2000–10000 and is processed as a single child job.

  2. If the job does not fit within the range specified in minJobSize and maxJobSize, the Mailcaster will look at the percentageJobSize parameter and attempt to divide the job using its value. For example, if the parent job is 100,000 records and percentageJobSize is 3, the Mailcaster will attempt to use a job size of 3000 (3% of 100,000).

  3. Next, it will look again at the minJobSize and maxJobSize parameters. If the child jobs in step 2 do not conform to these parameters, it adjusts them so they do. For example, if maxJobSize was set to 2000, it would not be possible for this Mailcaster to process a job of 3000 records. Instead, a job of 2000 records is created. Likewise, if minJobSize was set to 5000 records, then a 5000-record job would be created and processed. However, minJobSize is ignored if there are not enough emails left to send.

Mailcasters search the queue for jobs in priority order, based on the job’s type and its current state. Refer to Job Types on page 4 for a description of the types of jobs handled by Mailcasters, and to Mail Job States on page 6 for a description of job states.

Small Job Only Mailcasters and Small Job Priority Mailcasters look for jobs in the following order:

  1. Small mail jobs in RECOVERING state

  2. Small mail jobs in RUNNING state that are not being updated (also called “hanging” jobs)

  3. Small mail jobs in QUEUED state

    At this point if the Mailcaster is Small Job Only it can go no further, because these are the only types of mail jobs it can process. If it is a Small Job Priority Mailcaster, it continues its search:

  4. Child jobs in RECOVERING state

  5. Jobs in P_ASSIGNING state

  6. Jobs in P_QUEUED state.

Large Job Priority and Large Job Only Mailcasters look for jobs in the following order:

  1. Large jobs in RECOVERING state

  2. Large jobs in RUNNING state that are not being updated (“hanging” jobs)

  3. Jobs in P_ASSIGNING state

  4. Jobs in P_QUEUED state

  5. Small jobs in RECOVERING state (Large Job Priority Mailcasters only)

  6. Small jobs in RUNNING state that are not being updated (“hanging” jobs)(Large Job Priority Mailcasters only)

  7. Small jobs in QUEUED state. (Large Job Priority Mailcasters only)

This section describes the various states for mail jobs. These states appear in the Control Center.

Parent Mail Job States

The following states apply to parent mail jobs only.




The parent job is waiting for processing—that is, it has not yet entered the dedup stage.

(Deduping is a process done by the DES when the mail job is first created. A mail job can be sent to multiple audiences, and a contact can likewise be in multiple audiences. Deduping is the process where it is ensured that even if a contact is in multiple audiences of a mail job, that contact receives the mail only once.)


The parent job has finished deduping, but has not been worked on by a Mailcaster.


The parent job is being processed, but not all child jobs have yet been created. It is in the process of assigning child jobs.


The parent job has finished processing. All child jobs have been assigned but they have not yet finished running.


All child jobs are finished—the job has been completed successfully.


All child jobs have failed.


Some child jobs are finished and some have failed.


The job was stopped while it was in RUNNING state, using the Control Center. If the job is restarted, it will be changed to RECOVERING state.


The job was stopped while it was in a P_QUEUED state. If the job is restarted it will revert to the P_QUEUED state.

Small Mail Job States

The following state applies only to small jobs.




The job has finished deduping and is waiting to be processed by a Mailcaster.

Child and Small Job States

The following states apply to child and small jobs.




A child or small job is ready for recovering. This status is used when the Administrator performs the manual recovery—the Administrator sets the job status to RECOVERING by stopping and restarting the job using the Control Center, then waits for the Mailcaster to restart the job.


When a Mailcaster picks up a job in RECOVERING state and creates a new job for it, it is marked RECOVERED.


The job was stopped while it was in RUNNING state, using the Control Center. If the job is restarted, it will be changed to RECOVERING state.


The job was stopped while it was in a QUEUED state. If the job is restarted it will revert to the QUEUED state.


The job is in the process of being stopped from the Control Center, but the Mailcaster has not yet finished stopping it. When the job has finished stopping it will be updated to a STOPPED_R state. STOPPING is a transient state.


The Online Marketing Dialog Server has crashed during the dedup process and an orphaned job has been left in the database. When the scheduler next runs, it will update any such jobs to the INTERRUPTED status.


The job has failed to complete.


The job has finished successfully.


The job is being processed by the Mailcaster.

Parent, Child, and Small Job States

The following state applies to all types of mail jobs.




The small, child, or parent job has been stopped because the dialog was edited and the BulkEmailTask has been deleted. A job will also be marked STOPPED if it has no recipients.

See Parent Mail JobsSmall and Child Mail Jobs.