ec_get_message_num_retries

March 26, 2020 Contributors

Name

ec_get_message_num_retries — Return the num_retries of the current message.

Synopsis

ec_get_message_num_retries

Description

ec_get_message_num_retries returns the number of retries the current message has had. It returns this as an integer..

In the following script, the num_retries is checked and if a retry has occur, the message is permanently failed.

$n = ec_get_message_num_retries;
if not ec_test :is "${n}" "0" {
  ec_action 550 "ec_get_message_num_retries failed.  Expected 0, got ${n}";
}