WSO2ESB 入站端点的动态配置 [英] Dynamic configuration of the WSO2ESB inbound endpoints

查看:30
本文介绍了WSO2ESB 入站端点的动态配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想动态更改入站端点的一些参数.更准确地说,我有一个 RabbitMQ 入站端点,我想动态指定服务器主机名、端口、队列名称等,我该怎么做?

I'd like to dynamically change some of the parameters of my inbound endpoint. More precisely, I have a RabbitMQ inbound endpoint, and I would like to dynamically specify server host name, port, queue name, etc. How can I do this?

顺便说一句,如果不能用现有的组件来完成,那也没关系.例如,如果我可以创建一个自定义中介器来从消息上下文中读取这些属性,然后以某种方式 修改 RabbitMQ 入站端点,那也是很好/可以接受的,只是如何?

BTW, if it cannot be done with the existing components that's fine. It would also be great/acceptable if I could for example create a custom mediator that would read these properties from the message context and then somehow modify the RabbitMQ inbound endpoint, just how?

推荐答案

将入站端点参数指定为注册表值.

Specifying inbound endpoint parameters as registry values.

除了内联指定参数值外,您还可以将参数值指定为注册表项.将参数值指定为注册表项的优势在于,只需更改注册表项值,即可在不同环境中使用相同的入站端点配置.

Other than specifying parameter values inline, you can also specify parameter values as registry entries. The advantage of specifying a parameter value as a registry entry is that the same inbound endpoint configuration can be used in different environments simply by changing the registry entry value.

<inboundEndpoint xmlns="http://ws.apache.org/ns/synapse" name="file" sequence="request" onError="fault" protocol="file" suspend="false">
   <parameters>
      ...............
      <parameter name="transport.vfs.FileURI" key="conf:/repository/esb/esb-configurations/test"/>
      ...............
   </parameters>
</inboundEndpoint>

详细解释请参考[1].

Refer [1] for detailed explanation.

[1] - https://docs.wso2.com/display/ESB490/Working+with+Inbound+Endpoints

这篇关于WSO2ESB 入站端点的动态配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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