Sending email can be an expensive operation, and you generally do not want your components waiting for email to be sent. To prevent email from being a bottleneck, Dynamo includes an EmailListenerQueue class. This class again implements EmailListener, so it can be used in place of the SMTPEmail component. Any email messages sent to components of this class are queued up and handled by a separate thread, freeing your component from the potential bottleneck. That separate thread pulls email messages from the queue and sends them to another EmailListener, such as the SMTPEmail component or the SMTPBatchEmail component.

Dynamo comes with an instance of EmailListenerQueue at /atg/dynamo/service/SMTPEmailQueue. This queue empties into the /atg/dynamo/service/SMTPBatchEmail component. Thus, if you send your email events to the queue, they are first queued and then batched, for maximum performance. If you wish your email queue to empty directly into the SMTPEmail component, simply override the SMTPEmailQueue configuration such that its emailListeners property points to SMTPEmail rather than SMTPBatchEmail.

You probably want to configure your services to send email to the queue, rather than going directly to the SMTPEmail or the SMTPBatchEmail component:


loading table of contents...