wiki:Events

Version 1 (modified by mschenk, 11 years ago) (diff)

Certain actions on the website trigger events that are handed to a RabbitMQ queueing server. These events and their contents are described here.

1. Delivery mode

All events that are sent to the queue MUST be sent with delivery_mode = 2 (persistent messages).

2. Exchange name

All events are sent to the exchange extensionschoolevents

3. Mail events

Mail is sent through the queue server in order to accomplish asynchronous mail sending (keep the webserver from blocking).

A mail event is identified by the routing key mail.sending

The body of a mail event consists of a JSON-encoded dictionary of the following form:

{
  'from_email': 'sender@my.domain',
  'recipient_list': [ 'recipient1@gmail.com', 'recipient2@hotmail.com' ],
  'subject': 'The subject line for this message',
  'message': 'A multi-line string holding the text version of this message',
  'html_message': 'A multi-line string holding the html-version of this message',
}

The html_message field is optional.