haproxy/examples/lua
Aurelien DARRAGON 4537ac115a EXAMPLES: mailqueue for lua mailers script
Lua mailers scripts now leverages Queue class to implement a mailqueue.

Thanks to the mailqueue, emails are still sent asynchronously, but with
respect to their generation order (better ordering consistency).

That is, previous script limitation (see below) is no longer true:
"
 Current known script limitation: if multiple events are generated
 simultaneously it is possible that emails could be received out of
 order since emails are sent asynchronously using smtp_send_email()
 and there is no sending queue. Relying on the email "date" should
 help to know which email was generated first..
"

For a given server, email-alerts will be sent in the same order as the
events were generated. However this does not apply to events between 2
distinct servers, since each server is tracked independently within
the lua script. (1 subscription per server, to make sure only relevant
servers x events are being tracked and prevent useless wakeups)
2023-05-05 16:28:32 +02:00
..
event_handler.lua
mailers.lua EXAMPLES: mailqueue for lua mailers script 2023-05-05 16:28:32 +02:00
README

These files are example lua scripts that can be customized
if necessary.

They can be loaded with the 'lua-load' keyword like this:

    lua-load /path/to/lua_script.lua