MSMQ窥视和接收 [英] MSMQ Peek and Receive

查看:116
本文介绍了MSMQ窥视和接收的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我试图在我的datagrid视图中填充msqmq Q,

我使用下面的属性接收队列,但是
mes = Queue.Receive(new TimeSpan(0, 0, 3)); .
问题在于它也会删除队列,因此建议使用peek.

mes = Queue.Peek(new TimeSpan(0, 0, 3));
但这只会排在首位,
如何获得所有队列?我正在阅读有关枚举器"的内容,但找不到解决我的问题的示例.

Hi All,

I am trying to populate my msqmq Q in my datagrid view,

I used the property below to receive the queue but,
mes = Queue.Receive(new TimeSpan(0, 0, 3)); .
The problem with this is it will delete the queue also, so some one suggested using peek.

mes = Queue.Peek(new TimeSpan(0, 0, 3));
But it only gets the top queue,
how can I get all the queue''s? I was reading something about ''enumerator'' but couldn''t find examples to solve my problem.

推荐答案

您可以将Peek与光标一起使用,如所讨论的此处 [
You can use Peek with a cursor as discussed here[^].


这篇关于MSMQ窥视和接收的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆