简体   繁体   English

MSMQ将如何工作?

[英]How MSMQ will work?

Hi anybody know how MSMQ work with c#? 嗨,有人知道MSMQ如何与c#一起工作吗? I got a small problem Actually i need to enter 10 urls in a queue and want to execute at 10 different time spans automatically. 我遇到了一个小问题实际上我需要在队列中输入10个网址,并希望在10个不同的时间跨度自动执行。

Will it possible by using MSMQ with C# or is there any other technique is there? 通过将MSMQ与C#一起使用是否有可能,或者还有其他任何技术?

Please suggest me how to do it 请建议我该怎么做

Thanks in advance 提前致谢

If your goal is to create a bulk downloader, I had a lot of success (5000+ sites per minute) with the Concurrency and Coordination Runtime . 如果你的目标是创建一个批量下载,我有很多成功的(每分钟超过5000点)与并发与协调运行 CCR has fairly rugged scheduling capabilities, and helps to deal with the nasty threading issues that invariably arise from async IO. CCR具有相当坚固的调度功能,并有助于处理异步IO总是引起的讨厌的线程问题。 Jeff Richter kindly provides a set of wrappers for WebRequests. Jeff Richter为WebRequests提供了一组包装器。

It's hard to understand, but very rewarding when you do. 很难理解,但做起来却很有收获。

I wouldn't have considered MSMQ for this. 我不会为此考虑MSMQ。 Why do you? 你为什么?

MSMQ is a product that is most of the time used to achieve reliable messaging between applications running in different machines. MSMQ是一种产品,大部分时间用于在不同计算机上运行的应用程序之间实现可靠的消息传递。 It can also be used between application running in the same machine but is less common, but the objective is the same. 它也可以在同一台机器上运行的应用程序之间使用,但不太常见,但目标是相同的。 Some application puts a message in a queue and sometime later another application fetches the message. 某个应用程序将消息放入队列中,然后某个时间另一个应用程序获取该消息。

I don't know exactly what you want to achieve, but probably you can manage using the Queue class and some threads and timers. 我不完全知道您要实现什么,但是也许您可以使用Queue类以及一些线程和计时器进行管理。 Maybe it's overkill, but the open source schedule Quartz might also help. 也许这太过分了,但是开源计划Quartz可能也会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM