Dynamic Ports

The Dynamic Ports global element allows you to bind a free port to a property. It searches for a free port available and can be narrowed to a specific range.

For example, a dynamic port would look something like this:

<munit:dynamic-port propertyName="a.dynamic.port"/>

And it can be used in the http configuration:

<http:request-config name="httpRequestConfig">
    <http:request-connection host="localhost" port="${a.dynamic.port}"/>

Additionally you can set min and max values from where to get the port:

<munit:dynamic-port propertyName="a.dynamic.port" min="6000" max="7000"/>

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Give us your feedback!
We want to build the best documentation experience for you!
Help us improve with your feedback.
Take the survey!