Fire and Forget Design Pattern

Fire and Forget Design Pattern

This is simple message exchange pattern where requester does not wait from any specific response/acknowledgement from provider. The requester just need HTTP OK or Error message from integration layer as soon as message is received. The integration layer   continues to process the messages further after sending HTTP OK response.

The integration processes ensure messages delivery are guaranteed to the target system.

Asynchronous design pattern can make use of fire and forget design pattern.

  Process

  1. Requester will invoke the integration Process.
  2. The integration process will send HTTP OK response to the requester immediately without waiting for completion of the processes.
  3. The integration process validate, enrich and transform the request and invoke provider web service.
  4. The integration processes may store the messages in a database or queue.

 Exception Handling

  1. Process should be resubmitted by admin in case of error. Or target application can invoke the process again.

Use Case

When requester application does not need to know that request is reached to the final destination, this pattern can be used.  Also requester may provide callback service for getting the response from long running process.