简体   繁体   English

有关JMS队列和主题命名约定的建议

[英]Suggestions for JMS Queue and Topic naming conventions

For larger JMS deployments what are your best practice suggestions for naming conventions? 对于较大的JMS部署,您对命名约定的最佳实践建议是什么?

Currently we're following the suggestions in the Sun Developer Network Blueprints . 目前,我们正在遵循Sun Developer Network Blueprints中的建议。 For example: 例如:

jms/<resource-name>[Queue|Topic]

I am concerned about scaling this as we get more and more queues and topics in the system. 随着我们在系统中获得越来越多的队列和主题,我担心扩展它。 I'm particularly interested in hearing about experiences using hierarchical naming and how people have decided upon their naming conventions. 我特别感兴趣的是听到使用分层命名的经验以及人们如何决定他们的命名约定。

I would suggest something that incorporates corporate group, application and version information into a namespace hierarchy. 我建议将公司组,应用程序和版本信息合并到命名空间层次结构中。

For example: jms/mygroup.myproject.version.resource.queue 例如:jms / mygroup.myproject.version.resource.queue

This is useful if you have disparate technical groups using the same jms server cluster. 如果您使用相同的jms服务器群集的不同技术组,这将非常有用。 Also it prevents "crosstalk" between different versions of the same application. 它还可以防止同一应用程序的不同版本之间出现“串扰”。

A company I used to work for relied very heavily on JMS for SOA. 我曾经工作的公司非常依赖JMS for SOA。 They were also into domain-driven design, so they organized their services by business domain in the format <domain>/<function>/<version>. 他们也进入了域驱动设计,因此他们按照<domain> / <function> / <version>格式按业务域组织服务。 For example, price/compute-foobar-maintenance-fee/1.0. 例如,price / compute-foobar-maintenance-fee / 1.0。

The project wasn't part of the name because different projects shouldn't have their own "version of the truth" - two apps wouldn't have their own compute-foobar-maintenance-fee service. 该项目不是名称的一部分,因为不同的项目不应该有自己的“真相版本” - 两个应用程序不会有自己的计算 - foobar-维护费服务。 And which application provides the service is irrelevant to naming the service. 哪个应用程序提供服务与命名服务无关。 Maybe my application provides the service today but next year, my application will be retired and another will take over. 也许我的应用程序今天提供服务,但明年,我的应用程序将退休,另一个将接管。 As long as the contract remains the same, the client wouldn't/shouldn't know the difference. 只要合同保持不变,客户就不会/不应该知道差异。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM