If we wanted to replace ServiceControl auditing with our own message auditing solution what would be the best place in the NSB middleware to replace this behavior? Optimally this would give us the same guarantees as the ServiceControl auditing, with consistency with the actual outgoing messages and processing of the incoming message. In other words, we don’t have audit entries saying a message was successfully processed when it was actually rolled back.
We are already overloading our transport, Azure Service Bus, at peak times, so we do not want to send audit messages to an ASB queue, doubling the load. We would instead send to a Kafka topic in our Confluent subscription.
Another thought is, with OpenTelemetry, the only audit info we really need is the outgoing messages with bodies, because the processing of the incoming messages is already available in the distributed tracing information. If outgoing message bodies is all we are missing, would it be better to leave NSB audit disabled and enable SQL Server CDC with debezium on our NSB Outbox table to get a stream of outgoing messages to Kafka as alluded to here?
Or maybe there are some other thoughts on auditing with the upcoming NSB & Kafka integration?
About us:
In Azure
Using ASB transport with ASB Premium, tried partitioned ASB, but we have message sizes over 1mb currently, so ASB partitioning is not compatible
Will soon be using NSB SQL Server Persistence (made a mistake initially choosing Cosmos for NSB persistence even though all business data is in Azure SQL Manage Instance DBs)
On NSB v8, but moving to v9+ at some point
NSB apps with handlers are running in AKS, scaling with KEDA
I am assuming that implementing a Custom audit action might be the recommendation, but wasn’t sure if that is best if we want to totally replace the pipeline. It seemed most of the examples were related to modifying the behavior but still sending to an audit queue on the NSB-specified transport.
We do have an outgoing message auditing implementation that hooks into the IOutgoingLogicalMessageContext to send the outgoing messages to a Kafka topic, but am interested in what the deficiencies of this would be as well as how the solution can be improved.
Thanks for the reply, @danielmarbach. This was determined by many long hours with MS Support and communicating with the ASB team through GitHub issues.