INFO: Dynamic Queue Deletion and Return Code for MQSendMessage

ID: Q186191

The information in this article applies to:

SUMMARY

This article summarizes the return codes a Microsoft Message Queue Server (MSMQ) C API application sees that is operating on an open queue handle when the underlying queue instance is deleted from the Directory Service (DS).

In particular, MQSendMessage returns MQ_OK even if you delete the queue after opening it for Send in your C application. This behavior is by design as described below.

MORE INFORMATION

One way to simulate this scenario is to delete the queue in the Explorer after opening it in the application code.

If you delete the queue in Explorer after opening it in the application code, the MSMQ Send and Receive API returns the following codes:

REFERENCES

MSMQ SDK Online Help: search on: "Negative Arrival Acknowledgment Classes"; topic: ""MQMSG_CLASS_NACK_BAD_DST_Q"

For more information on setting up Acknowledgment messages, please see the MSMQ SDK help file.

Additional query words: kbDSupport kbdse kbnokeyword

Version           : WINNT:1.0
Platform          : winnt
Issue type        : kbinfo

Last Reviewed: August 18, 1998