admin 管理员组文章数量: 1086019
2024年3月9日发(作者:精易论坛担保系统)
微软消息队列
1. 安装微软消息队列组件(MSMQ)
Windows操作系统自带组件,需要开启该功能。成功开启后,在“计算机管理->服务和应用程序”中能够看到“消息队列”。下来就是用程序创建和访问消息队列。
2. 编程
在ing命名空间下开发自己的程序就可以了.使用起来非常方便.具体的请大家看MessageQueue和Message这两个类.
另外提下消息队列序列化问题:
.NET消息队列提供了如下的序列化程序:
XmlMessageFormatter, BinaryMessageFormatter, ActiveXMessageFormatter.
XmlMessageFormatter
这是默认的格式化程序,它是会将自定义的类型串行化为一个XML表示,这个格式化程序很慢,并且会创建相对较多的消息。然而,这些消息可以被运行在不同平台下的应用程序共享和理解。
● BinaryMessageFormatter
这个格式化应用程序会把自定义类型串行化为一个专有的二进制的格式。他比上面一种的速度要快得多,而且生成的消息很紧凑。然而只有运行在.NET中的接收者才可以容易地解析这个消息的内容。
● ActiveXMessageFormatter
ActiveXMessageFormatter和BinaryMessageFormatter一样,他会把自定义的类型串行化为专用的二进制格式。这个格式也就是MSMQ的COM组件使用的格式。这些传统的COM组件为COM语言(比如Visual Basic 6)提供了基于MSMQ的功能。因此,您可以在用Visual
Basic 6编写的MSMQ应用程序中使用这个格式化程序来发送消息或接收消息。
要注意的是,和XmlMessageFormatter不同的是,BinaryMessageFormatter使用的是二进制格式来把对象串行化到消息主体中。实际上,他使用了和.Net Remoting一样的运行库串行化机制,这就意味着要使用Serializable特性来修饰类型。同时对比一下,他没有默认的形式那么灵活,尽管速度快,紧凑的多。然而发送者和接收者都必须有一个程序集的副本。一般用到的是XmlMessageFormatter.
队列路径的引用:
● 通过路径——唯一标识计算机和感兴趣的队列的名称的路径。
– 公共队列MachineNameQueueName
– 专用队列MachineNamePrivate$QueueName本机上可以用.Private$QueueName指定.
● 通过格式名——队列的唯一标识符,创建队列时由MSMQ 生成,或者由应用程序生成。
– 公共队列FORMATNAME:PUBLIC=QueueGUID
– 专用队列FormatName:DIRECT=OS:{MachineName}Private${QueueName}
FormatName:DIRECT=tcp:{IP}Private${QueueName}
● 通过标签——可能不唯一的描述性队列名称,创建队列时由队列管理员指派。
– = "LABEL:MyQueue";
3. MessageQueue
3.1 构造函数
名称
MessageQueue ()说明
初始化一个MessageQueue的实例。在使用该实例前,必须设置实例的路径属性(Path property)。此时并未创建实际的消息队列。创建队列用Create方法。以下同。
MessageQueue(String)初始化一个队列的实例。用特殊的路径来代表该队列。
MessageQueue(String, Boolean)初始化一个队列的实例。用特殊的路径来代表该队列。并指明读访问模式。True排他读。False共享读。
MessageQueue(String,
QueueAccessMode)初始化一个队列的实例。用特殊的路径来代表该队列。并指明访问模式。
MessageQueue(String,
Boolean)Boolean,
初始化一个队列的实例。用特殊的路径来代表该队列。并指明读访问模式和是否使用cache。
Boolean,
初始化一个队列的实例。用特殊的路径来代表该队列。并指明读访问模MessageQueue(String,
Boolean, QueueAccessMode)式和是否使用cache,并指明访问模式。
QueueAccessMode成员
成员名称
Send
Peek
Receive
PeekAndAdmin
说明
队列仅可以发送消息。
队列仅可以查看消息。
队列可以查看或接收消息。
队列可以查看消息。消息也可以被清除。
ReceiveAndAdmin
队列可以接收消息。消息也可以被清除。
SendAndReceive
队列可以查看、接收或发送消息。
备注
创建 MessageQueue 时,如果未指定访问模式,访问模式默认为
dReceive。
创建 MessageQueue 后,无法更改访问模式。
路径属性Path property的语法格式取决于队列类型,如下
Queue type Syntax
Public queue
Private queue
Journal(日志) queue
Machine journal queue
Machine dead-letter queue
MachineName QueueName
MachineName Private$ QueueName
MachineName QueueName Journal$
MachineName Journal$
MachineName Deadletter$
Machine transactional dead-letter queue MachineName XactDeadletter$
"."代表本地计算机.
3.2 方法
名称
BeginPeek ()说明
初始化一个异步查看(asynchronous peek)操作,该操作没有超时的限制.只有当一条消息变为有效时,这个操作才会完成。
BeginPeek(TimeSpan)有超时限制的异步查看。只有当一条消息变为有效时,或者超时时,这个操作才会完成。
BeginPeek(TimeSpan, Object)有超时限制的异步查看,并指明了特定的状态对象(state object), 状态对象提供了该操作的生命周期内相关联的信息。只有当一条消息变为有效时,或者超时时,这个操作才会完成。
BeginPeek(TimeSpan, Object, AsyncCallback)有超时限制的异步查看,并指明了特定的状态对象。AsyncCallback 提供了当操作完成时,反射调用的事件处理函数。
BeginPeek(TimeSpan, Cursor, PeekAction, Object,
有超时限制的异步查看,并指明了特定的游标(cursor,AsyncCallback)消息队列中特定的位置),特定的查看活动(peek
action),特定的状态对象。AsyncCallback 提供了当操作完成时,反射调用的事件处理函数。
public enum PeekAction
成员
备注
将 PeekAction 枚举同 BeginPeek(TimeSpan,
Cursor, PeekAction, Object, AsyncCallback) 和
Peek(TimeSpan, Cursor, PeekAction) 一起使用,以成员名称
Current
Next
说明
查看队列中的当前消息。
查看队列中的下一条消息。
指示是查看队列中的当前消息还是下一条消息。
BeginReceive ()异步接收操作。
BeginReceive(TimeSpan)异步接收操作。参数含义与查看操作一样。
BeginReceive(TimeSpan, Object)异步接收操作。参数含义与查看操作一样。
BeginReceive(TimeSpan, Object, AsyncCallback)异步接收操作。参数含义与查看操作一样。
异步接收操作。参数含义与查看操作一样。
清除连接缓存
BeginReceive(TimeSpan, Cursor, Object, AsyncCallback)ClearConnectionCacheCloseFrees all resources allocated by the MessageQueue.
创建非事务(non-transactional)型的消息队列在特定的路径。
Create(String)Create(String, Boolean)创建事务或非事务(non-transactional)型的消息队列在特定的路径。
CreateCursor创建新游标,为当前消息队列
创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (继承自
MarshalByRefObject。)
CreateObjRefDelete(String)
删除特定路径的队列。
Dispose ()释放由 Component 使用的所有资源。 (继承自
Component。)
Dispose(Boolean)Disposes of the resources (other than memory) used by
the MessageQueue. (重写 Component .
Dispose(Boolean) 。)
EndPeek结束一个异步查看操作
EndReceive结束一个异步接收操作。
确定指定的 Object 是否等于当前的 Object。 (继承自 Object。)
Equals(Object)Exists(String)
判断特定路径的队列是否存在。Determines whether a
Message Queuing queue exists at the specified path.
Finalize在通过垃圾回收将 Component 回收之前,释放非托管资源并执行其他清理操作。 (继承自 Component。)
GetAllMessages获取所有消息Returns all the messages that are in the
queue.
GetEnumerator已过时。Enumerates
merator
the
is
messages in a
deprecated.
GetMessageEnumerator2 should be used instead.
GetHashCode用作特定类型的哈希函数。 (继承自 Object。)
GetLifetimeService检索控制此实例的生存期策略的当前生存期服务对象。
(继承自 MarshalByRefObject。)
GetMachineId获取队列所在机器标识。Gets the identifier of the
computer on which the queue referenced by this
MessageQueue is located.
GetMessageEnumerator已过时。Creates an enumerator object for all the
messages in the sageEnumerator is
deprecated. GetMessageEnumerator2 should be used
instead.
GetMessageEnumerator2创建所有消息的枚举对象。Creates an enumerator
object for all the messages in the queue.
GetMessageQueueEnumerator ()提供所有公共队列的向前游标。Provides forward-only
cursor semantics to enumerate through all public queues
on the network.
GetMessageQueueEnumerator(MessageQueueCriteria)提供满足特定标准的所有公共队列的向前游标。Provides forward-only cursor semantics to enumerate
through all public queues on the network that meet the
specified criteria.
GetPrivateQueuesByMachine获取计算机上的所有私有队列。Retrieves all the private
queues on the specified computer.
GetPublicQueues ()获取网络里的所有公共队列。Retrieves all the public
queues on the network.
GetPublicQueues(MessageQueueCriteria)获取网络里的所有符合标准的公共队列。Retrieves all
the public queues on the network that meet the specified
criteria.
GetPublicQueuesByCategory根据类别(category)获取网络里的所有公共队列。Retrieves all the public queues on the network that
belong to the specified category.
GetPublicQueuesByLabel根据标签(label)获取网络里的所有公共队列。Retrieves
all the public queues on the network that carry the
specified label.
GetPublicQueuesByMachine根据计算机获取网络里的所有公共队列。Retrieves all
the public queues that reside on the specified computer.
GetSecurityContext获取安全上下文。Retrieves the security context that
MSMQ associates with the current user (thread identity)
at the time of this call.
GetService返回一个对象,该对象表示由 Component 或它的
Container 提供的服务。 (继承自 Component。)
GetType获取当前实例的 Type。 (继承自 Object。)
InitializeLifetimeService获取控制此实例的生存期策略的生存期服务对象。 (继承自 MarshalByRefObject。)
MemberwiseClone创建当前 Object 的浅表副本。 (继承自 Object。)
MemberwiseClone(Boolean)创建当前 MarshalByRefObject 对象的浅表副本。 (继承自 MarshalByRefObject。)
Peek ()同步(阻塞)查看操作。查看不会删除第一条消息。Returns without removing (peeks) the first message in
the queue referenced by this MessageQueue. The Peek
method is synchronous, so it blocks the current thread
until a message becomes available.
Peek(TimeSpan)Returns without removing (peeks) the first message in
the queue referenced by this MessageQueue. The Peek
method is synchronous, so it blocks the current thread
until a message becomes available or the specified
time-out occurs.
Peek(TimeSpan, Cursor, PeekAction)Returns without removing (peeks) the current or next
message in the queue, using the specified
Peek method is synchronous, so it blocks the current
thread until a message becomes available or the specified
time-out occurs.
PeekByCorrelationId(String)根据交互作用(correlation)查看消息。Peeks the
message that matches the given correlation identifier and
immediately raises an exception if no message with the
specified correlation identifier currently exists in the
queue.
PeekByCorrelationId(String, TimeSpan)Peeks the message that matches the given correlation
identifier and waits until either a message with the
specified correlation identifier is available in the queue,
or the time-out expires.
PeekById(String)根据消息id查看 消息。Peeks the message whose
message identifier matches the id parameter.
PeekById(String, TimeSpan)Peeks the message whose message identifier matches the
id parameter. Waits until the message appears in the
queue or a time-out occurs.
PeekByLookupId(Int64)根据查找查看消息。Introduced in MSMQ at
the message that matches the given lookup identifier
from a non-transactional queue.
PeekByLookupId(MessageLookupAction, Int64)Introduced in MSMQ at a specific message
from the message can be specified by a lookup
identifier or by its position at the front or end of the
queue.
Purge清除队列 中的所有消息。Deletes all the messages
contained in the queue.
Receive ()同步(阻塞)接收第一条消息。Receives the first message
available in the queue referenced by the MessageQueue.
This call is synchronous, and blocks the current thread of
execution until a message is available.
Receive(MessageQueueTransaction)从事务型队列接收第一条消息。Receives the first
message available in the transactional queue referenced
by the MessageQueue. This call is synchronous, and
blocks the current thread of execution until a message is
available.
Receive(MessageQueueTransactionType)Receives the first message available in the queue
referenced by the MessageQueue. This call is
synchronous, and blocks the current thread of execution
until a message is available.
Receive(TimeSpan)Receives the first message available in the queue
referenced by the MessageQueue and waits until either a
message is available in the queue, or the time-out
expires.
Receive(TimeSpan, Cursor)根据指定的游标(cursor)获取当前消息。Receives the
current message in the queue, using a specified
no message is available, this method waits until either a
message is available, or the time-out expires.
Receive(TimeSpan, MessageQueueTransaction)Receives the first message available in the transactional
queue referenced by the MessageQueue and waits until
either a message is available in the queue, or the
time-out expires.
Receive(TimeSpan, MessageQueueTransactionType)Receives the first message available in the queue
referenced by the MessageQueue. This call is
synchronous, and waits until either a message is available
in the queue, or the time-out expires.
Receive(TimeSpan, Cursor, MessageQueueTransaction)Receives the current message in the queue, using a
specified no message is available, this method
waits until either a message is available, or the time-out
expires.
Receive(TimeSpan,
MessageQueueTransactionType)Cursor, Receives the current message in the queue, using a
specified no message is available, this method
waits until either a message is available, or the time-out
expires.
ReceiveByCorrelationId(String)Receives the message that matches the given correlation
identifier (from a non-transactional queue) and
immediately raises an exception if no message with the
specified correlation identifier currently exists in the
queue.
ReceiveByCorrelationId(String,
MessageQueueTransaction)Receives the message that matches the given correlation
identifier (from a transactional queue) and immediately
raises an exception if no message with the specified
correlation identifier currently exists in the queue.
ReceiveByCorrelationId(String,
MessageQueueTransactionType)Receives the message that matches the given correlation
identifier and immediately raises an exception if no
message with the specified correlation identifier currently
exists in the queue.
ReceiveByCorrelationId(String, TimeSpan)Receives the message that matches the given correlation
identifier (from a non-transactional queue) and waits
until either a message with the specified correlation
identifier is available in the queue, or the time-out
expires.
ReceiveByCorrelationId(String,
MessageQueueTransaction)TimeSpan, Receives the message that matches the given correlation
identifier (from a transactional queue) and waits until
either a message with the specified correlation identifier
is available in the queue, or the time-out expires.
ReceiveByCorrelationId(String,
MessageQueueTransactionType)TimeSpan, Receives the message that matches the given correlation
identifier and waits until either a message with the
specified correlation identifier is available in the queue,
or the time-out expires.
ReceiveById(String)Receives the message that matches the given identifier
from a non-transactional queue and immediately raises
an exception if no message with the specified identifier
currently exists in the queue.
ReceiveById(String, MessageQueueTransaction)Receives the message that matches the given identifier
(from a transactional queue) and immediately raises an
exception if no message with the specified identifier
currently exists in the queue.
ReceiveById(String, MessageQueueTransactionType)Receives the message that matches the given identifier
and immediately raises an exception if no message with
the specified identifier currently exists in the queue.
ReceiveById(String, TimeSpan)Receives the message that matches the given identifier
(from a non-transactional queue) and waits until either a
message with the specified identifier is available in the
queue or the time-out expires.
ReceiveById(String,
MessageQueueTransaction)TimeSpan, Receives the message that matches the given identifier
(from a transactional queue) and waits until either a
message with the specified identifier is available in the
queue or the time-out expires.
ReceiveById(String,
MessageQueueTransactionType)TimeSpan, Receives the message that matches the given identifier
and waits until either a message with the specified
identifier is available in the queue or the time-out
expires.
ReceiveByLookupId(Int64)Introduced in MSMQ es the message that
matches the given lookup identifier from a
non-transactional queue.
ReceiveByLookupId(MessageLookupAction,
MessageQueueTransaction)Int64, Introduced in MSMQ es a specific message
from a transactional message can be specified
by a lookup identifier or by its position at the front or end
of the queue.
ReceiveByLookupId(MessageLookupAction,
MessageQueueTransactionType)Int64, Introduced in MSMQ es a specific message
from the queue, using the specified transaction
message can be specified by a lookup
identifier or by its position at the front or end of the
queue.
Refresh刷新。Refreshes the properties presented by the
MessageQueue to reflect the current state of the
resource.
ResetPermissions恢复操作系统默认的允许列表。Resets the permission
list to the operating system's default s any
queue permissions you have appended to the default list.
Send(Object)发送消息到非事务队列。Sends an object to
non-transactional
MessageQueue.
queue referenced by this
Send(Object, MessageQueueTransaction)发送消息到事务队列。Sends an object to the
transactional queue referenced by this MessageQueue.
Send(Object, MessageQueueTransactionType)Sends an object to the queue referenced by this
MessageQueue.
Send(Object, String)Sends an object to the non-transactional queue
referenced by this MessageQueue and specifies a label
for the message.
Send(Object, String, MessageQueueTransaction)Sends an object to the transactional queue referenced by
this MessageQueue and specifies a label for the message.
Send(Object, String, MessageQueueTransactionType)Sends an object to the queue referenced by this
MessageQueue and specifies a label for the message.
SetPermissions(AccessControlList)设置允许列表。Assigns access rights to the queue based
on the contents of an access control list.
SetPermissions(MessageQueueAccessControlEntry)Assigns access rights to the queue based on the contents
of an access control entry.
SetPermissions(String, MessageQueueAccessRights)Gives a computer, group, or user the specified access
rights.
SetPermissions(String,
AccessControlEntryType)MessageQueueAccessRights, Gives a computer, group, or user the specified access
rights, with the specified access control type (allow, deny,
revoke, or set).
ToString返回包含 Component 的名称的 String(如果有)。 不应重写此方法。 (继承自 Component。)
3.3 扩展方法
名称
AsParallel说明
启用查询的并行化。 (由 ParallelEnumerable 定义。)
AsQueryable将 IEnumerable 转换为 IQueryable。 (由 Queryable 定义。)
Cast < TResult >
将 IEnumerable 的元素转换为指定的类型。 (由 Enumerable 定义。)
OfType < TResult >
根据指定类型筛选 IEnumerable 的元素。 (由 Enumerable 定义。)
3.4 字段
名称 说明
InfiniteQueueSizeSpecifies that no size restriction exists for a queue.
InfiniteTimeoutSpecifies that no time-out exists for methods that peek or receive messages.
3.5 属性
名称
AccessMode说明
访问模式。Gets a value that indicates the access mode for the queue.
Authenticate是否验证消息。Gets or sets a value that indicates whether the queue accepts only
authenticated messages.
BasePriority基础优先权。Gets or sets the base priority Message Queuing uses to route a public
queue's messages over the network.
CanRaiseEvents获取一个指示组件是否可以引发事件的值。 (继承自 Component。)
可读。Gets a value that indicates whether the MessageQueue can be read.
CanReadCanWrite可写。Gets a value that indicates whether the MessageQueue can be written to.
分类。Gets or sets the queue category.
CategoryContainer获取 IContainer,它包含 Component。 (继承自 Component。)
创建时间。Gets the time and date that the queue was created in Message Queuing.
CreateTimeDefaultPropertiesToSend消息默认属性。Gets or sets the message property values to be used by default
when the application sends messages to the queue.
DenySharedReceive排他性访问。Gets or sets a value that indicates whether this MessageQueue has
exclusive access to receive messages from the Message Queuing queue.
DesignMode获取一个值,用以指示 Component 当前是否处于设计模式。 (继承自
Component。)
EnableConnectionCache激活连接缓存。Gets or sets a value that indicates whether a cache of connections
will be maintained by the application.
EncryptionRequired只接收非私有消息。Gets or sets a value that indicates whether the queue accepts
only non-private (non-encrypted) messages.
Events获取附加到此 Component 的事件处理程序的列表。 (继承自 Component。)
FormatName唯一的队列名。Gets the unique queue name that Message Queuing generated at
the time of the queue's creation.
Formatter序列化对象。Gets or sets the formatter used to serialize an object into or deserialize
an object from the body of a message read from or written to the queue.
Id唯一的队列标识。Gets the unique Message Queuing identifier of the queue.
Label队列标签(说明)Gets or sets the queue description.
最后的修改时间。Gets the last time the properties of a queue were modified.
计算机名。Gets or sets the name of the computer where the Message Queuing
queue is located.
LastModifyTimeMachineNameMaximumJournalSize日志队列(journal queue)的最大容量。Gets or sets the maximum size of the journal
queue.
MaximumQueueSize队列最大容量。Gets or sets the maximum size of the queue.
MessageReadPropertyFilter消息过滤器。Gets or sets the property filter for receiving or peeking messages.
MulticastAddress多播地址。Introduced in MSMQ or sets the multicast address associated
with the queue.
Path队列路径。Gets or sets the queue's g the Path causes the MessageQueue
to point to a new queue.
QueueName队列名称。Gets or sets the friendly name that identifies the queue.
原始的读处理函数。Gets the native handle used to read messages from the
message queue.
ReadHandleSite获取或设置 Component 的 ISite。 (继承自 Component。)
SynchronizingObject引发事件处理的对象。Gets or sets the object that marshals the event-handler call
resulting from a ReceiveCompleted or PeekCompleted event.
Transactional事务模式。Gets a value that indicates whether the queue accepts only transactions.
使用日志队列。Gets or sets a value that indicates whether received messages are
copied to the journal queue.
UseJournalQueueWriteHandle原始的消息发送函数。Gets the native handle used to send messages to the
message queue.
3.6 事件
名称 说明
Disposed当通过调用 Dispose 方法释放组件时发生。 (继承自 Component。)
PeekCompleted异步查看操作完成。Occurs when a message is read without being removed from the
is a result of the asynchronous operation, BeginPeek.
ReceiveCompleted异步接收操作完成。Occurs when a message has been removed from the event is
raised by the asynchronous operation, BeginReceive.
4. Message
4.1 构造函数
名称
Message ()说明
初始化一个空的消息对象。
Message(Object)Message(Object, IMessageFormatter)用XmlMessageFormatter将一个对象序列化到消息体内。
用指定的格式化对象将一个对象序列化到消息体内。
4.2 方法
名称
CreateObjRef说明
创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (继承自
MarshalByRefObject。)
释放由
Component 使用的所有资源。 (继承自
Component。)
Dispose ()
Dispose(Boolean)Releases the unmanaged resources used by the
Component and
optionally releases the managed resources. (继承自
Component。)
Equals(Object)Finalize确定指定的
Object 是否等于当前的
Object。 (继承自
Object。)
在通过垃圾回收将
Component 回收之前,释放非托管资源并执行其他清理操作。 (继承自
Component。)
GetHashCode用作特定类型的哈希函数。 (继承自
Object。)
GetLifetimeService检索控制此实例的生存期策略的当前生存期服务对象。 (继承自
MarshalByRefObject。)
返回一个对象,该对象表示由
Component 或它的
Container 提供的服务。 (继承自
Component。)
获取当前实例的
Type。 (继承自
Object。)
GetServiceGetTypeInitializeLifetimeService获取控制此实例的生存期策略的生存期服务对象。 (继承自
MarshalByRefObject。)
MemberwiseClone
创建当前
Object 的浅表副本。 (继承自
Object。)
MemberwiseClone(Boolean)创建当前
MarshalByRefObject 对象的浅表副本。 (继承自
MarshalByRefObject。)
返回包含
Component 的名称的
String(如果有)。 不应重写此方法。 (继承自
Component。)
ToString4.3 字段
名称
InfiniteTimeout说明
说明没有超时限制。Specifies that no time-out exists.
4.4 属性
名称
AcknowledgeType说明
返回给发送方的应答消息的类型。Gets or sets the type of
acknowledgment message to be returned to the sending
application.
应答的分类。Gets the classification of acknowledgment that this
message represents.
AcknowledgmentAdministrationQueue接收应答消息的队列。Gets or sets the queue that receives the
acknowledgement messages that Message Queuing generates.
额外与应用相关的信息。Gets or sets additional,
application-specific information.
AppSpecificArrivedTime到达时间。Gets the time that the message arrived in the
destination queue.
AttachSenderId是否附加发送者ID。Gets or sets a value that indicates whether
the sender ID should be attached to the message.
是否验证。Gets a value that indicates whether the message was
authenticated.
AuthenticatedAuthenticationProviderName用来产生数字签名的密码提供者的名字。Gets or sets the name
of the cryptographic provider used to generate the digital
signature of the message.
用来产生数字签名的密码提供者的类型。Gets or sets the type of
AuthenticationProviderType
cryptographic provider used to generate the digital signature of
the message.
Body消息体。Gets or sets the content of the message.
BodyStream消息体内的信息。Gets or sets the information in the body of the
message.
消息体内数据的类型。Gets or sets the type of data that the
message body contains.
BodyTypeCanRaiseEvents获取一个指示组件是否可以引发事件的值。 (继承自
Component。)
指示消息属性是发送应用设置。Gets or sets a value that indicates
that some message properties typically set by Message Queuing
were set by the sending application.
获取
IContainer,它包含
Component。 (继承自
Component。)
ConnectorTypeContainerCorrelationId原始消息的标识。Gets or sets the message identifier used by
acknowledgment, report, and response messages to reference the
original message.
获取一个值,用以指示
Component 当前是否处于设计模式。
(继承自
Component。)
DesignModeDestinationQueue目的队列。Gets the intended destination queue for a message.
DestinationSymmetricKey获取或设置对称密钥,用于加密应用程序消息,或发送到外部队列的消息。Gets or sets the symmetric key used to encrypt
application-encrypted messages or messages sent to foreign
queues.
认证用的数字签名。Gets or sets the digital signature that
Message Queuing uses to authenticate the message.
DigitalSignatureEncryptionAlgorithm加密算法。Gets or sets the encryption algorithm used to encrypt
the body of a private message.
获取附加到此
Component 的事件处理程序的列表。 (继承自
Component。)
EventsExtension附加的、应用相关的信息。Gets or sets additional,
application-defined information associated with the message.
Formatter格式化对象。Gets or sets the formatter used to serialize an object
into or deserialize an object from the message body.
HashAlgorithm哈希算法。Gets or sets the hashing algorithm that Message
Queuing uses when authenticating a message or creating a digital
signature for a message.
Id消息标识。Gets the message's identifier.
IsFirstInTransaction是不是一次事务中的第一个消息。Gets a value that indicates
whether the message was the first message sent in a transaction.
是不是一次事务中的最后一个消息。Gets a value that indicates
whether the message was the last message sent in a transaction.
应用定义的消息标签。Gets or sets an application-defined
Unicode string that describes the message.
IsLastInTransactionLabelLookupId查找器标识。Introduced in MSMQ the message's lookup
identifier.
MessageType消息类型。Gets the message type:
Normal,
Acknowledgment, or
Report.
优先级。Gets or sets the message priority, which determines
where in the queue the message is placed.
PriorityRecoverable当机器或网络故障时,是否安全投递。Gets or sets a value that
indicates whether the message is guaranteed to be delivered in
the event of a computer failure or network problem.
ResponseQueue接收响应消息的队列。Gets or sets the queue that receives
application-generated response messages.
消息的安全上下文。Gets or sets the security context for a
message.
SecurityContextSenderCertificate安全证书。Gets or sets the security certificate used to
authenticate messages.
发送者标识。Gets the identifier of the sending user.
SenderIdSenderVersion发送者版本。Gets the version of Message Queuing used to send
the message.
发送时间。Gets the date and time on the sending computer that
the message was sent by the source queue manager.
获取或设置
Component 的
ISite。 (继承自
Component。)
SentTimeSiteSourceMachine创建原始消息的机器。Gets the computer from which the
message originated.
TimeToBeReceived最大接收次数。Gets or sets the maximum amount of time for the
message to be received from the destination queue.
TimeToReachQueue到达队列的最大次数。Gets or sets the maximum amount of time
for the message to reach the queue.
TransactionId事务标识。Gets the identifier for the transaction of which the
message was a part.
TransactionStatusQueue事务状态队列。Gets the transaction status queue on the source
computer.
发送前,是否验证。Gets or sets a value that indicates whether the
message was (or must be) authenticated before being sent.
UseAuthenticationUseDeadLetterQueue无法投递的消息是否复制到死信(无法投递,dead-letter) 队列。Gets or sets a value that indicates whether a copy of the
message that could not be delivered should be sent to a
dead-letter queue.
是否是私有消息。Gets or sets a value that indicates whether to
make the message private.
UseEncryptionUseJournalQueue消息是否复制到机器的日志中。Gets or sets a value that indicates
whether a copy of the message should be kept in a machine
journal on the originating computer.
是否追踪消息传递过程。Gets or sets a value that indicates
whether to trace a message as it moves toward its destination
queue.
UseTracing4.5 事件
名称 说明
Disposed当通过调用
Dispose 方法释放组件时发生。 (继承自
Component。)
版权声明:本文标题:微软消息队列 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1709953545a551027.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论