大网数据广告活动
网络与域名解析

Using MSMQ as an RPC Transport

· 52CE 我爱测

The RPC subsystem supports using MSMQ as a transport in synchronous and asynchronous modes.

The RPC subsystem supports using MSMQ as a transport in synchronous and asynchronous modes.

Synchronous mode uses conventional remote procedure calls. These calls use well-known endpoints and the message queue transport, ncadg_mq, as the transport protocol. In synchronous mode, your remote procedures can have [ in] and [ out] parameters and can use the standard RPC security services. The RPC subsystem creates a reply queue for remote calls containing [out] parameters. The synchronous mode is useful for applications where the client needs to receive data from the server. The main limitation of this mode is that, as with conventional remote procedure calls, both the client and server must be running and remain running for the duration of the call.

Asynchronous mode lets client applications make calls to the server and return immediately, regardless of the state of the server application or the server computer. It also makes a subset of MSMQ features available for managing message queues and information flow. The RpcBindingSetOption function lets you control quality of service, call priority, journaling, security, and the lifetime of the server process queue. The RpcServerUseProtseqEpEx function lets you specify attributes of the server process queue, such as queue persistence, authentication, and encryption.

You implement asynchronous MSMQ as you would synchronous MSMQ. You must use well-known endpoints, and define the transport protocol to be ncadg_mq. In your IDL file, apply the message attribute to the functions that use asynchronous message queuing. Note that message functions can have [in] parameters only.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。