4.1 Application Opening and Closing a Local Queue Example

The following sequence diagram illustrates an application interacting with a supporting server to open a queue handle for a queue located at the supporting server.

Queue opening

Figure 2: Queue opening

  1. The application begins the RPC session by invoking R_QMGetRTQMServerPort to query the RPC port number for subsequent method invocations.

  2. The application invokes rpc_QMOpenQueueInternal, specifying a format name identifying the queue to open.

  3. The supporting server's determines that the queue identified by the format name is located locally. A local queue handle is returned. lplpRemoteQueueName is NULL, to indicate that a remote queue open sequence (demonstrated in section 4.2) is not necessary.

  4. The application performs operations utilizing the local queue handle, such as send, receive, peek, or purge.

  5. The application closes the local queue handle when it is no longer required.