Connecting two systems is easy to describe and surprisingly easy to get wrong. Data arrives late, a receiving service becomes unavailable, or the same request is delivered twice. A reliable integration starts by making these conditions part of the design.
Give the boundary a clear job
An integration boundary translates between systems. It should make the contract explicit: which fields are required, what a valid response looks like, and how incompatible changes are handled. Keep each side independent of the other system’s internal data model where possible.
That boundary can be a direct API call, a background worker, or a message queue. The choice follows the work. A user waiting for an immediate result may need a synchronous response. A task that can finish later may benefit from a queue and a worker. Adding a queue to every interaction creates extra operational work without automatically making the system more reliable.
Decide what happens when things fail
Timeouts and temporary outages are normal operating conditions. Set sensible time limits, retry only failures that may recover, and use a bounded retry policy. A retry can deliver the same request more than once, so the receiving side should be able to recognize repeated work when the operation must happen only once.
For events that can arrive out of order, define whether ordering matters and how stale updates are handled. These rules belong in the integration contract, where both sides can be designed around them.
Make the work visible
Record enough context to trace a request across the boundary: a correlation identifier, the operation being attempted, and its outcome. Avoid logging credentials or sensitive payloads. Useful signals show how many operations are waiting, how often they fail, and whether retries are making progress.
Plan for recovery
Some failures need a person to inspect the data and decide what to do next. Make those cases visible and provide a controlled way to replay or reconcile work. A system is easier to operate when recovery is a deliberate path rather than an improvised database edit.
The right integration is the smallest design that makes its contract, failure behavior and recovery path clear. That is usually a more useful starting point than choosing a particular messaging pattern in advance.