I want to be able to save/update a document in DocumentDB and then publish an event on Azure Service Bus, and I want these to happen atomically.
Azure Service Bus does not support distributed transactions, so with a SQL database, I save my record and place a record in a message queue table, all within a SQL transaction. A process then reads the message queue table and places the messages on the queue and removing them from the queue when successful (utilizing Service Bus' deduplication in case a message is added twice).
But DocumentDB does not support transactions across collections, so I cannot update a document and then add a document to a message queue collection.
How can I ensure my changes to documents are published on the bus?