2.5.6 Receive a Message from a Queue - Application

 Context of Use: This use case covers the counterpart of the Send Message use case. An application receives a message from a queue. The application optionally uses a Directory Service to look up the queue name.

 Goal: This use case receives a message from a queue.

 Actors

Application:  See section 2.5.

Application Users:  See section 2.5.

Directory Service:  See section 2.5.

 Stakeholders

Developers: See section 2.5.

Testers:  See section 2.5.

Application Users: See section 2.5.

 Preconditions

This use case has the same preconditions as in Send Message to Queue – Application (section 2.5.3) with the exception that the receiving application is authorized to receive messages from the queue.

 Main Success Scenario

 Trigger: The direct actor triggers this use case based on the actions of the primary actor. It is also triggered by the Exchange Message - Application (section 2.5.8)-use case.

The steps involved in this use case are:

  1. The application optionally obtains the queue name from the Directory Service.

  2. The application sends a request to the queue manager to receive a message from the queue and waits for a response from the queue manager within a specific time-out.

  3. The queue manager performs validation checks and fails the operation in case of an error.

  4. If a message is not available, the queue manager blocks the application until a message is available, or until the receive operation in step 2 times out or is canceled. In the latter case, an error response is returned to the application, and this use case completes.

  5. The queue manager removes the available message from the queue and returns it to the application as part of the response.

 Postcondition

  • If a message is available to receive in the queue and is returned to the application as a result of the receive operation, the message is removed from the queue.

 Extensions

None.