NServiceBus 队列命名约定
有没有人在使用 NServiceBus 时为 MSMQ 队列开发了一个合适的命名约定,其中单个服务器上有很多队列,但其他服务器上也有很多队列?
我正在开发的系统将在一组服务器上有许多离散的订阅者,并且某些服务器将运行多个不相关的应用程序。
如果能够打开 msmq 管理控制台并立即知道所有队列的用途,那就太好了。
干杯
Has anyone developed a decent naming convention for MSMQ queues when using NServiceBus, where there are many queues on a single server, but also on other servers?
The system I'm developing will have many discrete subscbribers across a set of servers, and some of the servers will run multiple unrelated applications.
It would be nice to be able to open the msmq management console and immediately know the purpose for all the queues.
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我相信您会找到与开发人员一样多的不同方法来实现此目的。
我们实际上没有任何非 NServiceBus 队列,因此我们不需要像 Adam Fyles 建议的那样为它们添加前缀“nsb_”。
我们喜欢使用点分隔的表示法来大致模仿类名称空间,例如“ProjectName.QueueName”。
或者,对于真正的大型项目,需要进行更多 Udi 风格的服务边界分析,我们将执行类似“BigProjectName.ServiceName.QueueName”的操作。
我们有一个运行分配器的 NServiceBus 集群,这是我们定位错误队列的位置,因此每个端点都使用类似“Error@NSBCluster”的内容。这使我们能够从一个地方监控系统。
I'm sure you'll find as many different ways to do this as you'll find developers.
We don't really have any non-NServiceBus queues, so we have no need to prefix them "nsb_" like Adam Fyles suggested.
We like to do a dot-separated notation that roughly mimics class namespaces, like "ProjectName.QueueName".
Or for really big projects, where there's more Udi-style service boundary analysis going on, we'll do something more like "BigProjectName.ServiceName.QueueName".
We have an NServiceBus cluster that runs our distributors, and this is where we locate our error queue, so every endpoint uses something like "Error@NSBCluster". This enables us to monitor the system from one place.
我做什么
What I do
我们使用 nsb_$endpoint_$function,其中 $function = 错误或审核。 $function 仅在端点处被保留。在安装主机时,我们还将其与显示名称和服务名称相匹配。我们的管理员希望能够将流程与服务相匹配,然后与队列相匹配。
We use nsb_$endpoint_$function where $function = error or audit. $function is left off for just the endpoint. We also make this match the Display Name and Service Name when installing the host. Our admins like being able to match the process to the service and then to the queue.