JMS(尤其是 Tibco EMS)我可以在消息代理中拥有一个环境吗

发布于 2024-07-04 08:47:58 字数 149 浏览 5 评论 0原文

我有一个包含一些主题的消息代理,以及在其上运行的一组应用程序。 现在我想在相同的主题上(如果可以的话,在同一个代理上)运行一组新的相同应用程序(例如 QA 环境)。 做这个的最好方式是什么。 创建一个新的代理和/或创建一组新的主题非常麻烦,因为我们的环境处于严格的官僚机构之下。

I have a message broker with some topics, and some set of applications running on it. Now I want to run a new set of the same applications (say for QA environment) on the same topics (on the same broker, if I could). What is the best way to do this. Creating a new broker and or creating a new set of topics is cumbersome, as our environments are under tight bureaucracy.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

后来的我们 2024-07-11 08:47:59

AFAIK EMS 不支持您所建议的任何内容。 有几种选择可以满足您的需求。

拥有独立的 EMS 服务器将是理想的解决方案。 这将使您的非生产环境出现一些问题,而不会在生产环境中造成问题。

使用同一服务器,您可以将特定于环境的前缀附加到所有队列/主题名称上。 需要对要使用的前缀进行一些应用程序级别设置(qa、dev、test、prod...)。 这可以很好地隔离环境,但如果任何环境负载确实很重,则可能效果不佳。

对于主题,您可以使用一些 JMS 标头属性和消息订阅来确定将它们路由到哪个环境。 我不推荐这样做,因为很容易搞砸并破坏两个环境。

AFAIK EMS does not support anything like what you suggest. There are a few options to get what you are looking for.

Having independent EMS servers would be the ideal solution. This would allow your non-production environment to have some hickups without causing problems in your production environment.

Using the same server you can have an environment-specific prefix tacked onto all the queue/topic names. There would need to be some application level setting for which prefix to use (qa, dev, test, prod, ...). This would make for pretty good isolation of the environments, but would probably not work too well if any of the environments are really heavily loaded.

For topics you can use some JMS header property and messages subscriptions to determine which environment to route them to. I would not recommend this as it would be pretty easy to screw it up and corrupt both environments.

各自安好 2024-07-11 08:47:59

我建议不要同时对生产和 QA 使用相同的中间件服务器(特别是消息代理),因为在 QA 中您可能需要进行加载和加载。 您不希望影响生产的浸泡测试。 正如约翰提到的,使用单独的服务器将是最简单的方法。

这有点奇怪,为什么在 QA 环境中复制相同的主题会有如此严格的官僚作风; 你不能转储 EMS 的生产安装吗?

FWIW 对于一些消息代理,主题和队列的创建有点微不足道。 例如,在 Apache ActiveMQ 中,应用程序开发人员选择他们想要使用的队列和主题名称 - 然后连接到代理对于正确的环境,它就可以工作(尽管如果您想要增加官僚机构,您可以添加安全性以禁止某些用户创建主题/队列:)。

作为旁白; 我一直觉得很滑稽的是,在企业环境中,对于允许使用哪些队列/主题名称有相当严格的政策,但在 Web 应用程序中,开发人员可以自由地在应用程序中使用他们想要的任何 URI。 毕竟,在这两种情况下,它们只是逻辑名称 - 中间件应该能够以任何一种方式工作并支持审核:)

I'd recommend against using the same middleware servers for both production and QA at the same time (particularly message brokers) as in QA you will probably want to do load & soak tests which you don't want affecting production. As John mentions, using a separate server would be the simplest approach.

Its kinda bizarre why there's such tight bureaucracy over replicating the same set of topics in a QA environment; can't you just take a dump of the production installation of EMS?

FWIW with some message brokers, the creation of topics and queues is kinda trivial. e.g. in Apache ActiveMQ application developers choose what queue and topic names they want to use - then you connect to a broker for the right environment and it just works (though you can add security to disable certain users from creating topics/queues if you want added bureaucracy :).

As an aside; I've always found it quite comical how in enterprise environments there are quite draconian policies about what queue/topic names you are allowed to use - yet in web applications developers are free to use whatever URIs they want in their applications. After all in both cases they are just logical names - the middleware should be able to just work and support auditing either way :)

神经大条 2024-07-11 08:47:59

此要求可以通过在消息主题/队列或“主题”中作为限定符来实现,因此您可以在同一服务器上将环境模式从 DEV 隔离到 TEST。请记住,不建议跨环境的消息流通过使用相同的 EMS 服务器。

这个特殊的需求应该在“主题命名约定”中解决,这是 SOA 架构中定义消息格式、消息交换模式和主题设计等的经典任务。

例如,您的主题可以是 ..... 其中 DEV或测试或UAT等

this requirement can be achieved by having as a qualifier in the message topics/queues or "subjects", so you can segregate the environment mode from DEV to TEST on the same server.Keep in mind that, flow of messages across environments are not recommended by using same EMS Server.

This particular requirement should be addressed in "Subject Naming Conventions", which is a classic task in SOA Architecture defining message formats, message excahange patterns and design of subjects etc.

For eg, your subject can be ..... where would be DEV or TEST or UAT etc

难理解 2024-07-11 08:47:59

我不会在同一个应用程序的多个环境中使用相同的服务器,您可能会发生串扰,一个环境的消息最终会出现在另一个环境中。 复制队列/主题并不复杂,重新配置应用程序应该是一件快速的事情。

您可能想了解的其他概念是
桥(可以将发送到主题/队列的消息复制到另一个)我使用它来将一个主题中的相同消息自动复制到 2 个不同的队列。 我知道您可以在某个主题上使用持久订阅者,但这就是队列的用途(恕我直言)

消息选择:仅检索具有特定标头的消息的能力。

您还可以在桥上进行消息选择。

I would not use the same servers for Multiple environments for the same app, you could have cross talk where messages for one environment end up in the other. Duplicating Queues/Topics are not the complicated and it should be a Quick thing to reconfigure an app.

Other concepts you might want to know about are
Bridges (Where messages to a Topic/Queue can be copied to another) I have used this to have the same message from one topic be copied automatically to 2 different queues. I know you can use a durable subscriber on a topic but that's kind of what a queue is for(IMHO)

Message Selecting : The ability to only retrieve messages if they have a specific Header on it.

You can also do message selecting on a bridge.

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