Inbound, asynchronous flow
In an asynchronous request-response process for inbound ebMS2 messages, the external partner establishes and uses one connection to send the message and the Acknowledgment request, the internal partner establishes and uses another connection to send the Acknowledgment.
The following figure illustrates the ebMS2 flow for inbound, asynchronous messages. The flow uses HTTP response codes. The asynchronous flow of an inbound message is as follows:
- The external partner generates a message and sends the message to the MSH of the external partner. The MSH of the external partner establishes a connection to the B2B Gateway, which is the MSH of the internal partner.
- The B2B Gateway receives the message and processes it.
- The B2B Gateway forwards the message to the internal partner.
- The B2B Gateway performs one of the following actions:
- If an Acknowledgment is requested, the B2B Gateway sends an
HTTP 204 No Contentmessage to indicate that an Acknowledgment is to be returned in a separate connection. For reliable messaging mechanism, the B2B Gateway generates an asynchronous Acknowledgment, establishes a new connection to the MSH of the external partner, and sends the Acknowledgment. - If an Acknowledgment is not requested, the B2B Gateway sends an
HTTP 200 OKmessage to the MSH of the external partner.
- If an Acknowledgment is requested, the B2B Gateway sends an
- The MSH of the external partner receives the response and closes the connection. The B2B Gateway marks the transaction as complete.

If the B2B Gateway does not deliver the required asynchronous Acknowledgment to the external partner for an inbound transaction, the transaction is regarded as a pending inbound transaction.