单个队列上的消息队列存储限制不起作用? [英] message queue storage limit on a single queue doesn't work?

查看:97
本文介绍了单个队列上的消息队列存储限制不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

:

<块引用>

MQSendMessage() 总是成功,即使很明显无法发送消息.为什么?MQSendMessage() 的成功没有保证将消息传递到其最终目的地.这MQSendMessage() 成功仅意味着本地 MSMQ 服务成功接受消息,它将尽快处理可能的.这并不意味着任何保证将消息传递给其目的地队列.交付失败的原因有很多信息.例如:

  • 您尝试向事务队列发送非事务性消息.
  • 您向已超出配额的队列发送消息.
  • 您向未授予您发送权限的队列发送消息.
  • 您使用 DIRECT 格式名称向不存在的计算机发送消息.

MQSendMessage() 按照设计在所有这些情况下都会成功.它是拒绝此类消息的目标计算机.或者消息会在传出队列中等待,直到它过期.

Send() doesn't throw exception when the queue is full.

I have two private message queue, say queue and queue1, i set message storage of queue1 to a small amount say 5120 kb, in my program i send message to both queue and queue1, when queue1 is full while the global queue is not full, the Send() method on queue1 doesn't throw exception, why is this? i was expecting the send() method on queue1 throw exception so i know it is full.

解决方案

I think this is by design:

from MSMQ FAQ:

MQSendMessage() always succeeds even when it is obvious that the message cannot be sent. Why? The success of MQSendMessage() does not guarantee the delivery of the message to its ultimate destination. The success of MQSendMessage() merely means that the local MSMQ service successfully accepted the message and it will process it as soon as possible. It doesn't imply any guarantee to deliver the message to its destination queue. There are many reasons for failures to deliver a message. For example:

  • You attempt to send a nontransactional message to a transaction queue.
  • You send a message to a queue that has exceeded its quota.
  • You send a message to a queue which does not grant you the send permission.
  • You send a message to a computer which does not exist, using the DIRECT format name.

MQSendMessage() will succeed in all these cases, by design. It is the destination computer which reject such messages. Or the message will wait in an outgoing queue until it expires.

这篇关于单个队列上的消息队列存储限制不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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