ec_mailq_insert_active

March 26, 2020 Contributors

Name

ec_mailq_insert_active — Insert a message into the active queue

Synopsis

#include "mail_queue.h"

| void **ec_mailq_insert_active** ( | mq, |   |
|   | message); |   |

mail_queue * <var class="pdparam">mq</var>;
ec_message * <var class="pdparam">message</var>;

Description

Insert a message into the active queue. The location of the message in the active queue is determined by its next_attempt time (as set by the ec_message_set_next_attempt function).

Note

The message must not be in any other Momentum queue when this function is called. Once this function returns, it takes responsibility for the ec_message passed in.

Parameters

mq

A pointer to a mail queue. The mail_queue struct is defined at “mail_queue”.

Mail queues are typically determined by looking at the domain record.

message

A pointer to an ec_message struct. For documentation of this data structure see “ec_message”.

Return Values

This function returns void.

Threading

It is legal to call this function in the Scheduler thread.

See Also

ec_mailq_dequeue_live_message, ec_mailq_message_requeue and ec_mailq_find_live_message