MSMQ写取> 1分钟

发布于 2024-11-08 20:51:49 字数 836 浏览 0 评论 0原文

我们一直面临一个问题,消息写入 MSMQ 的速度非常慢。我们的队列位于 Windows Server 2008 SP2 上。该队列是公共队列,地址为“servername\queuename”。

将消息发送到队列的代码是

MessageQueue queue = new MessageQueue(Settings.Default.DefaultDestinationQueue);
queue.Formatter = new BinaryMessageFormatter();

queue.Send(message);

我们尝试发送的消息只是一个“PublishMessage”,如下所示:

[Serializable]
public class PublishMessage {
    public int EntryId {get; set; }
}

我们看到消息实际上到达了队列,但之前和之后的记录表明它通常需要每条消息超过 1 分钟。

此时,我们看不出队列配置有任何问题,但我们不是队列专家——这是此应用程序的第一个添加。有人有什么想法吗?

编辑:我们的服务器运行的是 SP 2(不是我最初所说的 SP1)。直接在托管队列的计算机上运行实例速度很快,而其他任何实例则不然。

注意:将此交叉发布于https://serverfault.com/questions/ 272242/msmq-write-take-1-分钟

We have an ongoing problem with message writes to MSMQ being very slow. Our queue is on Windows Server 2008 SP2. The queue is a public queue, addressed at "servername\queuename".

The code to send a message to the queue is

MessageQueue queue = new MessageQueue(Settings.Default.DefaultDestinationQueue);
queue.Formatter = new BinaryMessageFormatter();

queue.Send(message);

The message that we're trying to send is simply a "PublishMessage", as follows:

[Serializable]
public class PublishMessage {
    public int EntryId {get; set; }
}

We're seeing the messages actually reach the queue, but logging before and after shows that it's generally taking in excess of 1 minute for each message.

At this time, we can't see anything wrong with our queue configuration, but are not queuing experts--this is the first addition to this application. Anyone have any ideas?

Edit: Our server is running SP 2 (not SP1 that I originally stated). Running an instance directly on the machine hosting the queue is fast, any other is not.

Note: Crossposted this at https://serverfault.com/questions/272242/msmq-write-taking-1-minute

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一笑百媚生 2024-11-15 20:51:49

我们的问题原来是服务器无法正确验证的基础设施问题。我们的系统管理员最终通过重新配置托管队列的服务器来解决这个问题。

Our problem turned out to be an infrastructure issue with servers not properly authenticating. Our sysadmin finally got it straightened out by reconfiguring the server hosting the queue.

荒岛晴空 2024-11-15 20:51:49

队列是事务性的还是非事务性的?尝试切换此设置,看看是否会出现相同的行为。

为队列分配了多少空间?尝试增加空间,和/或将其存储移动到不同的驱动器(在不同的物理轴上)。

系统队列中有消息吗?检查系统队列中的消息。另外,尝试清除系统队列中的所有消息并重新运行。

Is the queue transactional or non-transactional? Try toggling this setting and see if you get the same behavior.

How much space is allocated for the queue? Try increasing the space, and/or moving its storage to a different drive (on a different physical spindle).

Are there messages in the system queues? Check the system queues for messages. Also, try purging all the messages from the system queues and re-run.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文