Webhook messages are not fired in a logic order

Hi there,

I’m trying to implements progress reporting of encoding task through webhook. I’m facing some challenges, maybe some bugs.

The first issue is some webhooks are not fired at all (‘Encoding Finished’, ‘Encoding Error’, ‘Encoding Transfer Error’). In the past month, the 3 of them was OK and are a safeguard to me to mitigate the second issue (by applying higher priority to messages from these webhooks).

The second issue is about the ‘Encoding Changed’ webhook. I started to try with a global one (All Encodings), but he was never fired (it was 3 month ago), so I switch to create one by encoding (Specific Encodings).
For the later one, messages are fired and processed by my API, but I can see messages are sent by batch from bitmovin, and the order of the messages is not really consistent (My first impressionwas I receive a lot of them in the same second, and all messages are basically in a random order). So I tried to ignore messages with a “triggeredAt” property less than the previous one processed. Before the first issue : everything was fine (because I applied a higher priority to the 3 previous webhooks).
Now, with the first issue, I’m trying to do the job with the only working webhook (Specific encoding). But this one triggered a message with "encodingStatus":{"type":"Encoding","progress":0,"status":"RUNNING"} with a triggeredAt greater than the message with "encodingStatus":{"type":"Encoding","progress":100,"status":"RUNNING"}.

So I can’t figured out how to solve the problem : messages are fired in a inconsistent order from bitmovin (it’s ok for me to not assume the order is consistent), but the only property with enough accuracy (triggeredAt) is not reliable too…

I need a way to report consistenly the progress of the encoding, know when an error occured, react on the success event to process some internal business logic.
Should I skip the webhook way and resolve it by the pooling way (and drop several month of work) ?

I paste logs of my system (all messages from webhooks are logged with a date and the raw body of the request) :

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4264031Z payload: {“id”:“e1561754-c2d7-4f7a-be26-c23037490467”,“eventId”:“df08c97d-f18c-4715-ba11-828c6adb5c98”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:22:33Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:52.239410032Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Encoding”,“progress”:100,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4317279Z BEGIN: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.8417961Z END in 410.0613ms: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.8418103Z redlock acquired
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.8468227Z current state: {“triggeredAt”:“2024-01-09T12:22:52.2647248Z”,“shardingScope”:{“event”:“0c5039e4-9877-ec11-94f6-c896657528cb”,“authtenant”:“460c7b45-80a0-49f8-b2cf-7bd9c20264de”,“customer”:“bbc9bfab-b416-4dc9-a5eb-b96354c8073d”},“entityId”:“99e097ba-0f81-ed11-9f5e-000d3abcb1fd”,“fieldPath”:“videofile”,“entityName”:“Session”,“progress”:0,“syncId”:“ed19f1ac-e9ae-ee11-8925-000d3a4814e1”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.8469432Z exit no content

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4212033Z payload: {“id”:“118a3a10-2562-4e5f-b61f-b998497b7dc2”,“eventId”:“3e2efa96-2c77-4493-a528-5a27231d91c0”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:22:33Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:52.176765731Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Encoding”,“progress”:26,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4265346Z BEGIN: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7504699Z END in 323.9151ms: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7504834Z redlock acquired
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7584831Z current state: {“triggeredAt”:“2024-01-09T12:22:52.2647248Z”,“shardingScope”:{“event”:“0c5039e4-9877-ec11-94f6-c896657528cb”,“authtenant”:“460c7b45-80a0-49f8-b2cf-7bd9c20264de”,“customer”:“bbc9bfab-b416-4dc9-a5eb-b96354c8073d”},“entityId”:“99e097ba-0f81-ed11-9f5e-000d3abcb1fd”,“fieldPath”:“videofile”,“entityName”:“Session”,“progress”:0,“syncId”:“ed19f1ac-e9ae-ee11-8925-000d3a4814e1”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7587453Z exit no content

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4231511Z payload: {“id”:“bc93790b-0549-492e-b285-a8a089e55fd8”,“eventId”:“daac2415-dfd1-4a45-8a40-7717f55b9968”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:22:33Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:52.264724753Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Encoding”,“progress”:0,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4238589Z BEGIN: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4395497Z END in 15.6815ms: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4395768Z redlock acquired
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4535826Z current state: {“triggeredAt”:“2024-01-09T12:22:32.6565418Z”,“shardingScope”:{“event”:“0c5039e4-9877-ec11-94f6-c896657528cb”,“authtenant”:“460c7b45-80a0-49f8-b2cf-7bd9c20264de”,“customer”:“bbc9bfab-b416-4dc9-a5eb-b96354c8073d”},“entityId”:“99e097ba-0f81-ed11-9f5e-000d3abcb1fd”,“fieldPath”:“videofile”,“entityName”:“Session”,“progress”:0,“syncId”:“ed19f1ac-e9ae-ee11-8925-000d3a4814e1”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.5298085Z return ok

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4319235Z payload: {“id”:“f65a71f8-bc98-4c38-9c4a-d489156a6e3c”,“eventId”:“8be9c8e1-c408-4ddc-a6ca-d5ca3d10192a”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:22:33Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:52.196157511Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Analysis”,“progress”:100,“status”:“FINISHED”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4261992Z payload: {“id”:“3cd96e98-1727-4633-8d1a-c4c8494414cf”,“eventId”:“cbffa5eb-26cc-442d-bf48-e7a4054285e1”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:22:33Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:52.153906042Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Analysis”,“progress”:100,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4105174Z payload: {“id”:“109e15c9-a71f-4423-be70-b441ca968cce”,“eventId”:“7688ad2a-372a-4235-baa7-efc0f1aa9485”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:22:33Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:52.216292983Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Encoding”,“progress”:100,“status”:“FINISHED”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.4302483Z BEGIN: acquire high redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7863204Z END in 356.0636ms: acquire high redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7863349Z redlock acquired
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7926136Z current state: {“triggeredAt”:“2024-01-09T12:22:52.2647248Z”,“shardingScope”:{“event”:“0c5039e4-9877-ec11-94f6-c896657528cb”,“authtenant”:“460c7b45-80a0-49f8-b2cf-7bd9c20264de”,“customer”:“bbc9bfab-b416-4dc9-a5eb-b96354c8073d”},“entityId”:“99e097ba-0f81-ed11-9f5e-000d3abcb1fd”,“fieldPath”:“videofile”,“entityName”:“Session”,“progress”:0,“syncId”:“ed19f1ac-e9ae-ee11-8925-000d3a4814e1”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:52.7927733Z exit no content

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7518980Z payload: {“id”:“1df0ee39-83a2-4f4b-9aac-2f32aa5a3b02”,“eventId”:“439cb358-695d-4eef-ab86-aac9e62a0d9b”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:21:56Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:32.656541768Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Encoding”,“progress”:0,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7851410Z BEGIN: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.8121840Z END in 26.9024ms: acquire low redlock
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.8122442Z redlock acquired
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.9718649Z current state: {“ShardingScope”:{“event”:“0c5039e4-9877-ec11-94f6-c896657528cb”,“authtenant”:“460c7b45-80a0-49f8-b2cf-7bd9c20264de”,“customer”:“bbc9bfab-b416-4dc9-a5eb-b96354c8073d”},“EntityId”:“99e097ba-0f81-ed11-9f5e-000d3abcb1fd”,“FieldPath”:“videofile”,“EntityName”:“Session”,“Progress”:0,“SyncId”:“ed19f1ac-e9ae-ee11-8925-000d3a4814e1”}
[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:35.6164718Z return ok

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7519156Z payload: {“id”:“327fc6a2-a5ef-4c2d-a05d-2f2205912876”,“eventId”:“ace51164-849d-42e7-8392-536a582ed12e”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:21:56Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:32.584462447Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Input file analysis”,“progress”:0,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7550380Z payload: {“id”:“9e051bdf-61aa-40c3-bb62-521c2c157a26”,“eventId”:“b095cd85-f954-4cb4-ac5d-caaf937f9299”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:21:56Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:32.695830180Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Analysis”,“progress”:100,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7556701Z payload: {“id”:“ce3c5a8d-28b0-46dd-8b9a-6970f0e24f59”,“eventId”:“2dd254b9-c063-4cce-a29b-a7719d0fc06d”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:21:56Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:32.622172443Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Input file download”,“progress”:100,“status”:“FINISHED”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7532650Z payload: {“id”:“c9c2e01e-8d7c-41c3-b9e6-345de8d63127”,“eventId”:“fe89b619-f078-4b0a-a61c-62c528e4cfec”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:21:56Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:32.638442564Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Input file analysis”,“progress”:100,“status”:“FINISHED”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7519091Z payload: {“id”:“24cfa5c3-fef7-4b66-ac98-05391cbf61ad”,“eventId”:“83338686-2abe-482a-9069-c5cece657245”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:21:56Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:32.603970732Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Input file download”,“progress”:0,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

[5d7803a0-f481-4d14-8546-25f3f5e068a7] 2024-01-09T12:22:32.7521850Z payload: {“id”:“a52035ab-0461-42d7-9704-e98c2aff07ff”,“eventId”:“0b43a8d9-aebc-419c-8f0a-8d8ac98605d9”,“createdAt”:“2024-01-09T12:21:56Z”,“modifiedAt”:“2024-01-09T12:21:56Z”,“orgId”:“fdf84d2c-7fc7-478f-ae70-81d3319695df”,“userId”:“72409f7a-b945-41d4-bd81-005629e778d9”,“notificationId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”,“resourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“resourceType”:“ENCODING”,“type”:“WEBHOOK”,“eventType”:“ENCODING_STATUS_CHANGED”,“category”:“ENCODING”,“state”:“FIRED”,“triggeredAt”:“2024-01-09T12:22:32.678382413Z”,“triggeredForResourceId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“internal”:false,“customData”:{“encodingId”:“5d7803a0-f481-4d14-8546-25f3f5e068a7”,“outputContainer”:“cu-bbc9bfab-b416-4dc9-a5eb-b96354c8073d”,“outputPath”:“ev/0c5039e4-9877-ec11-94f6-c896657528cb/Session/99e097ba-0f81-ed11-9f5e-000d3abcb1fd/videofile”,“inputContainer”:“2cea912f-29f7-4f8c-8e9f-b6fd18e55e94”,“inputPath”:“91a397cb-12ae-4b66-ac18-7a31adda353d”},“encodingStatus”:{“type”:“Analysis”,“progress”:0,“status”:“RUNNING”},“webhookId”:“201023fb-5ecf-4c71-9bc6-18b7c90b210c”}

In my previous message, you can extract 3 payloads with an illustration of the second issue :

{"id":"e1561754-c2d7-4f7a-be26-c23037490467","triggeredAt":"2024-01-09T12:22:52.239410032Z","encodingStatus":{"type":"Encoding","progress":100,"status":"RUNNING"}}
{"id":"118a3a10-2562-4e5f-b61f-b998497b7dc2","triggeredAt":"2024-01-09T12:22:52.176765731Z","encodingStatus":{"type":"Encoding","progress":26,"status":"RUNNING"}}
{"id":"bc93790b-0549-492e-b285-a8a089e55fd8","triggeredAt":"2024-01-09T12:22:52.264724753Z","encodingStatus":{"type":"Encoding","progress":0,"status":"RUNNING"}}

You can see the third message with "progress":0 and triggeredAt higher to the two others.

Hi Dev,

Apologies for the delay in response.

The webhooks are a little confusing as the progress is reset to 0 for each encoding task is complete, these are the tasks which make up a single encoding:

  • when a progressive muxing is started
  • when the upload of a progressive muxing is started
  • when the creation of a just in time manifest is started
  • when the upload of a just in time manifest is started.

The timestamps are correct but the order seems incorrect due to the resets when each task completes. I am looking into solutions to make this more obvious with the engineering team, either a ‘total progress’ number or an added process name to each status webhook.

I’m also checking the status of your global webhooks.

Thanks,

Callum

On the global webhooks, I found this entry to be muted, could this be the webhook you’re missing?

    {
      "id": "7bacb5ee-9c05-4d2b-9902-fcf5822b095d",
      "type": "WEBHOOK",
      "eventType": "ENCODING_FINISHED",
      "category": "ENCODING",
      "muted": true,
      "customData": null,
      "emails": [],
      "url": "https://pre-apifront.inwink.ninja/bitmovin/notification/callback/finished",
      "method": "POST",
      "insecureSsl": false,
      "signature": {
        "type": "HMAC"
      },
      "name": "finished on https://pre-apifront.inwink.ninja",
      "userId": "72409f7a-b945-41d4-bd81-005629e778d9",
      "orgId": "fdf84d2c-7fc7-478f-ae70-81d3319695df",
      "internal": false,
      "createdAt": "2024-01-18T10:40:29Z",
      "modifiedAt": "2024-01-19T09:14:16Z",
      "triggeredAt": "2024-01-19T09:14:15Z",
      "resourceType": "ENCODING"
    }

I found this by calling this:
https://developer.bitmovin.com/encoding/reference/getnotificationsbynotificationid

Then unmuting it with this:
https://developer.bitmovin.com/encoding/reference/postnotificationsunmutebynotificationid

I’ve done this for you.

Thanks,
Callum