Published Events Missing

We are currently experiencing some issues in both production and non-production which is slightly worrying and wondering whether anyone has any ideas.

FYI we are using SQLTransport.

We have an API endpoint that publishes out a series of events in a synchronous loop before the call completes. We have an NServiceBus windows service that is subscribed to these events and on the whole is receiving and processing these.

The issue we are facing is that intermittently certain events are going missing and not being processed. We have confirmed the subscription is OK for the windows service in the API’s subscription table (otherwise it wouldn’t receive anything at all). We have logged out the fact that each publish loop has happened in the API endpoint.

When this happens and we run the same data through we tend not to be able to recreate it hence using the term “intermittent”.

We are at a loss as to how to further investigate this and find the underlying issue, please help!

After posting this we have found this Pipeline events so will putting that in the windows service to see whether the full set of events are actually received.

What version of NServiceBus are you using? Can you share the code that actually publishes the messages?

In the past when I’ve seen someone having this problem, it’s been because they weren’t properly awaiting our async APIs, so the messages aren’t actually published.