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

时间:2021-02-01 23:26:35

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.

我有一个消息代理,其中包含一些主题,以及在其上运行的一些应用程序集。现在我想在相同的主题上运行一组相同的应用程序(比如QA环境)(如果可以的话,在同一个代理上)。做这个的最好方式是什么。创建一个新的经纪人和/或创建一组新的主题是很麻烦的,因为我们的环境是严格的官僚主义。

4 个解决方案

#1


2  

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

AFAIK EMS不支持您的建议。有几种方法可以满足您的需求。

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.

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

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.

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

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.

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

#2


1  

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.

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

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?

有点奇怪为什么在质量保证环境中复制同一组主题的官僚主义如此严密;你不能只是采取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 :).

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

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 :)

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

#3


0  

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.

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

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.

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

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

例如,您的主题可以是..... DEV或TEST或UAT等

#4


0  

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)

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

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.

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

#1


2  

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

AFAIK EMS不支持您的建议。有几种方法可以满足您的需求。

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.

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

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.

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

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.

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

#2


1  

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.

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

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?

有点奇怪为什么在质量保证环境中复制同一组主题的官僚主义如此严密;你不能只是采取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 :).

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

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 :)

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

#3


0  

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.

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

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.

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

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

例如,您的主题可以是..... DEV或TEST或UAT等

#4


0  

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)

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

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.

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