有没有一种方法可以在MSMQ中为消息分配一个标识符,然后稍后通过该标识符定位该消息(如果它仍在队列中)?
更具体地说,它需要是我控制下的唯一标识符,而不是MSMQ分配的标识符。
有没有一种方法可以在MSMQ中为消息分配一个标识符,然后稍后通过该标识符定位该消息(如果它仍在队列中)?
更具体地说,它需要是我控制下的唯一标识符,而不是MSMQ分配的标识符。
您可以使用messages如果要使用在发送消息之前创建的标识符,请标记属性。
消息LookupID标识符在发送消息之前无法访问。
为什么不使用CorrelationId?
var message = new Message(new Messageval(), new BinaryMessageFormatter());
message.CorrelationId = messageId;
queue.Send(message);
然后检索如下消息:
var resp = (Messageval) queue.ReceiveByCorrelationId(messageId,
TimeSpan.FromSeconds(30))
.Body;
CorrelationId需要正好由20个字节组成,否则分配时将引发异常。
We are using Queue for few of are WCF services. We are using NetMSMQ binding for the WCF services which use Private MSMQ. The system works OK on our QA environment. I am not sure of any real ...
When was MS Message Queue first released?
I have a bunch of messages in one of the queues from an old date. I would like to take a backup before purging them. Any thoughts? Schar
I have a Microsoft Message Queue that gets populated with messages. If there is a problem with the processing of the message, I would like to retry the message, I do not want to retry the message ...
I use the Message Queue to send messages from one application to the other one (this has to work only on one particular machine) I create the queue like this on the receiver side: string ...
I m doing testing against some software I ve written. The test enqueues messages into MSMQ via WCF at a rate faster than than my software can dequeue and process them. This shouldn t be a problem, ...
I m trying to use the Distributor in the NServiceBus FullDuplex sample but I can t get it working. I ve been following the this guide Getting the NServiceBus Distributor Working, but it doesn t work. ...
I ve got a really frustrating problem with MSMQ constantly refusing to work even though it s installed and started. I have MSMQ installed on my Vista Business laptop (MSMQ-Container;MSMQ-Server;MSMQ-...