当远程计算机未连接时,如何将消息发送到远程队列而不将消息保存在传出队列中?
我有一台具有专用队列的远程计算机,服务器将这些消息发送到远程队列。这工作正常。问题是,当远程计算机未连接到网络或关闭时,消息将保存在服务器的传出队列中,并在远程计算机联机时稍后传送。现在我的要求是,如果消息未传递,服务器应该知道。在当前情况下,没有抛出异常,因为它保存在传出队列中。
现在我想到三件事。
- 传出队列不应保存消息。
- 应从远程计算机返回一些确认。
- 我应该直接通过队列 url 发布消息,因为它托管在 IIS 下。
我想采用解决方案 3,但没有找到有关该主题的任何资源。
I have a remote machine that has a private queue and the server sends these messages to the remote queue. This is working fine. The issue is when the remote machine is not connected to network or turned off, the messages are saved in outgoing queue of the server and delivered later on when remote machine comes online. Now my requirement is that if the message is not delivered the server should know. And in the current case there is no exception is thrown as its saved in outgoing queue.
Now I have three things in mind.
- The outgoing queue should not save the message.
- Some acknowledgement should be returned from remote machine.
- I should post message directly by queue url as its hosted under IIS.
I would like to go with solution 3 but not finding any resouces over the topic.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看为消息设置接收超时并使用死信队列。当远程服务器在指定的超时时间内没有读取消息时,消息将被移至死信队列。您可以监视死信队列以了解远程服务器何时未收到消息。
Look at setting a receive timeout on your message and using dead letter queues. When the remote server doesn't read the message in the timeout specified the message will be moved to the dead letter queue. You can monitor the dead letter queue to know when message were not received by the remote server.