WSO2 ESB - dynamic value for proxy settings (transport)

I need to specify the dynamic value of the proxy parameter. In fact, I have to specify each parameter with a full URL, for example:

<parameter name="transport.vfs.FileNamePattern">.*.txt</parameter> 

I see some samples with a property broker, and I assume that it works for the following proxies, but the problem is that I need to change the value of the proxy settings before it is executed, I think. I tried using the โ€œtriggerโ€ proxy, which calls a custom mediator, which changes the SynapseConfiguration of the required proxy, but this does not work.

Is there a way to replace this fixed value with a search to create some deployment configuration?

Many thanks.

+4
source share
2 answers

You can check this post How to dynamically route a message to a WSO2 ESB based on an XML configuration file for an example of how to dynamically set values โ€‹โ€‹in a proxy sequence.

You can do something like the following:

 <parameter name="transport.vfs.FileNamePattern"> <script language="js">mc.getProperty('MY_DYNAMIC_VALUE')</script> </parameter> 

I'm not sure this will help you much, since I suspect that the vfs parameters are set when initializing the proxy server, and not on the fly. If you try, if possible, return to this topic if it works or not.

Regards, nidkil

+2
source

The parameters in the proxy server definitions are service level parameters that are in the Axis2Service configuration. They are used when you initialize the Axis2Service in this case with your Synapse / WSO2 ESB proxy service. Thus, you cannot change parameters dynamically on the fly.

But I can offer the following approach. It may or may not apply to your scenario.

You have a set of VFS proxies that listen on specific locations. Each of them will consider the file extension. (one for .txt one for .foo, etc.)

Use another vfs shared proxy to copy files to fix places dynamically (which accepts any extension). (You can use the vfs sender).

Hope this helps.

amuses, Harit

0
source

All Articles