Webhook Events Fire in Descending Order (and not batched?)

Octopus 3.8.8

Event [intervention, failure, succeed] --> azure function --> slack

From my Azure console:

[2017-03-23T21:16:03.7820404+00:00 http://localhost] SubscriptionPayload batchProcessed: 2017-03-23T21:16:02.6518279+00:00
Using Slack Webhook from AppSettings
Setting Channel Override: #octopus-events
Subscription Prod Deployments
Processing Event Events-6929: Deploy to Uranium 235 encountered guided failure  for GF Project release 0.0.34 to Uranium 235
Formatting rich text message
1 Message Attachments
Sending slack message
Slack: 200 OK

[2017-03-23T21:16:02.6558219+00:00 http://localhost] SubscriptionPayload batchProcessed: 2017-03-23T21:16:02.6518279+00:00
Using Slack Webhook from AppSettings
Setting Channel Override: #octopus-events
Subscription Prod Deployments
Processing Event Events-6932: Deploy to Uranium 235 succeeded  for GF Project release 0.0.34 to Uranium 235
Formatting rich text message
1 Message Attachments
Sending slack message
Slack: 200 OK

The events share the same batchProcessing time but come in staggered and not in the order I would expect.

Furthermore, I get a 1:1 webhook even though the batchProcessing time is the same. I would have assumed (and wrote my code in such a way) to consume multiple Events from 1 webhook. This behavior seems a bit strange as well.

Hi,

Thanks for getting in touch! Currently the way subscriptions work with webhook notifications is one notification per event as you’ve said. You can reference some more details in our documentation: https://octopus.com/docs/administration/subscriptions#Subscriptions-WebhookNotifications

The decision behind the way these webhook notifications work was to avoid potential performance issues when sending them all in one batch. However you raise a good point, and we can see how improvements can be made.

We had an internal discussion regarding your question, and we came to a consensus that webhook notifications should be able to work similarly to how email notifications work. Email notifications send a digest of events that occurred since the last scheduler (up to a maximum of 100 - to avoid potential blow outs). We will look at adding additional fields to track webhook events in a batch. This will then allow you to know when the batch has completed.

We have created a GitHub issue with some more details, and you can follow it here: https://github.com/OctopusDeploy/Issues/issues/3332

Let me know if you have any further questions!

Kenny