分配器和工作器端点队列在同一台机器上 [英] Distributor and worker end point queue in same machine

查看:37
本文介绍了分配器和工作器端点队列在同一台机器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 NServiceBus 3.2.2.0,尝试在同一台机器上测试分配器和工作器.我注意到经销商正在创建以下队列

I am using NServiceBus 3.2.2.0, trying to test distributor and worker in same machine. I noticed distributor is creating following queues

  • 端点队列
  • EndPointQueue.distributor.control
  • EndPointQueue.distributor.storage
  • EndPointQueue.retries
  • EndPointQueue.timeouts

工作人员正在创建一个新队列,例如:

And worker is creating a new queue something like:

  • EndPointQueue.5eb1d8d2-8274-45cf-b639-7f2276b56c0c

有没有办法指定工作人员端点队列名称而不是工作人员通过在端点队列前添加随机字符串来创建队列?

Is there a way to specify worker end point queue name instead of worker creating a queue by prefixing random string with end point queue?

推荐答案

由于在与 master(分发服务器)相同的机器上运行 worker 并没有真正意义,NServiceBus 假设您这样做是为了测试仅用于并生成这种队列名称.

Since it doesn't really make sense to run a worker on the same machine as the master (distributor), NServiceBus assumes that you're doing this for test purposes only and generates this kind of queue name.

在真正的分布式场景中,worker 在自己的机器上运行,它将与 master 具有相同的队列名称.整个想法是,您不必更改任何代码或配置即可从单台机器部署到横向扩展部署.

In a true distributed scenario where the worker is running on its own box, it will have the same queue name as the master. The whole idea is that you shouldn't have to make any code or config changes to go from a single machine to a scaled-out deployment.

这篇关于分配器和工作器端点队列在同一台机器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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