当远程计算机未连接时,如何将消息发送到远程队列而不将消息保存在传出队列中?

发布于 2024-10-31 02:32:25 字数 301 浏览 8 评论 0原文

我有一台具有专用队列的远程计算机,服务器将这些消息发送到远程队列。这工作正常。问题是,当远程计算机未连接到网络或关闭时,消息将保存在服务器的传出队列中,并在远程计算机联机时稍后传送。现在我的要求是,如果消息未传递,服务器应该知道。在当前情况下,没有抛出异常,因为它保存在传出队列中。

现在我想到三件事。

  1. 传出队列不应保存消息。
  2. 应从远程计算机返回一些确认。
  3. 我应该直接通过队列 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.

  1. The outgoing queue should not save the message.
  2. Some acknowledgement should be returned from remote machine.
  3. 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 技术交流群。

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

发布评论

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

评论(1

凉城已无爱 2024-11-07 02:32:25

查看为消息设置接收超时并使用死信队列。当远程服务器在指定的超时时间内没有读取消息时,消息将被移至死信队列。您可以监视死信队列以了解远程服务器何时未收到消息。

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.

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