Page 1 of 1

Webhook Message Status

PostPosted: Fri Jul 09, 2021 5:34 pm
by SBarnes
What are the different statuses for web hook messages and what to they mean?

For a client we are somehow ending up with messages with status 1 in in web hook messages that seem to remain there and I believe it is because of


Code: Select all
            if (message.Status == 1)
                return;


which is at the top of

Code: Select all
static public void CallWebhook(SY_WebhookMessage message)

Re: Webhook Message Status  Topic is solved

PostPosted: Fri Jul 09, 2021 6:44 pm
by Mike.Sheen
SBarnes wrote:What are the different statuses for web hook messages and what to they mean?


// 0 = not sent, never been tried
// 1 = successfully sent already
// 2 = failed to send, retry pending
// 3 = failed permanently

SBarnes wrote:For a client we are somehow ending up with messages with status 1 in in web hook messages that seem to remain there and I believe it is because of

Code: Select all
            if (message.Status == 1)
                return;


1 means it's been sent, so it should stay at 1. The message.Status == 1 check is an attempt to prevent a message being sent multiple times. We've re-jigged things a bit in the next release to make that more reliable, as we found short retry intervals could still cause them to be sent more than once.

Re: Webhook Message Status

PostPosted: Fri Jul 09, 2021 6:54 pm
by SBarnes
I think the issue is Azure SQL again and the insert into reply and update to message is blowing up and therefore it never gets to the code to remove the item from in memory messages, so we end up going round and round with a whole heap of status ones in the queue.

I've changed the code in CallWebhook to use my new retry and connection with greater timeouts for ORM Lite and added some more logging to get a better picture of what's going on.

If it works and remains stable with the retro fitted 7.3 stuff I'll email it through to you as well, so you are aware of what was issues, as I've said before this customer knows how to stress test it. :D