title: Distributed System - How to guarantee at least once published a message?
body: <p>How to maintain consistency between disparate system (aka bounded contexts) when failures happen before publishing the message in a service bus (it could be a queue ).?</p>
  
  <p>I figured out 3 options:
  1. Using Udi Dahan  approach ( Reliable Messaging - <a href="https://vimeo.com/111998645" rel="nofollow noreferrer">https://vimeo.com/111998645</a>), i.e., maintain a published messages information in the same store as the entity that generated the event.
  2. Process database transaction logging, and published it to a message bus.
  3. Use event sourcing approach.</p>
  
  <p>Is there any options besides that? What are the pros and cons of each approach?</p>