Name
msg_dispose — Called immediately prior to disposing of an ec_message
Synopsis
#include "ec_message.h"
#include "io_wrapper_int.h"
| int **msg_dispose** (
| closure, | |
| | msg)
; | |
Description
**Configuration Change. ** This hook point is available as of Momentum version 3.5.5.
Note
When a message fails, this hook is typically used to reroute messages to another channel. For example, you can use this hook point to convert an Apple or Google push notification to an SSMP message. This hook is accessible from Lua via the generic_delivery_msg_dispose
callout.
This hook is called right before an ec_message is finally disposed as delivered successfully or failed, either permanently or temporarily. The context variable VCTX_KEY_DLV_RESPONSE_STATUS
holds the protocol status code that indicates a message's status. The context variable VCTX_KEY_DLV_RESPONSE_STATUS_DETAIL
holds the detailed string description of the status code.
Use ec_message_context_get to determine the value of context variables. These values will differ depending upon the protocol. Use ec_message_get_delivery_method to determine how a message was sent.
- closure
-
The closure function.
- msg
-
The message. For a description of this data type see “ec_message”.
Currently the return value has no significance.
This hook will be called in the Scheduler
thread.