Generic Properties¶
Info
The following are generic properties that can be used with the Property mediator and the Property Group mediator.
Generic properties allow you to configure messages as they're processed by the Micro Integrator, such as marking a message as out-only (no response message will be expected), adding a custom error message or code to the message, and disabling WS-Addressing headers.
PRESERVE_WS_ADDRESSING¶
Parameter | Description |
---|---|
Name |
PRESERVE_WS_ADDRESSING |
Possible Values |
"true", "false" |
Default Behavior |
none |
Scope |
synapse |
Description |
By default, the Micro Integrator adds a new set of WS-Addressing headers to the messages forwarded from the Micro Integrator. If this property is set to " |
Example |
RESPONSE¶
Parameter | Description |
---|---|
Name |
RESPONSE |
Possible Values |
"true", "false" |
Default Behavior |
none |
Scope |
synapse |
Description |
Once this property is set to 'true' on a message, the Micro Integrator will start treating it as a response message. It is generally used to route a request message back to its source as the response. |
Example |
OUT_ONLY¶
Parameter | Description |
---|---|
Name |
OUT_ONLY |
Possible Values |
"true", "false" |
Default Behavior |
none |
Scope |
synapse |
Description |
Set this property to "true" on a message to indicate that no response message is expected for it once it is forwarded from the Micro Integrator. In other words, the Micro Integrator will do an out-only invocation with such messages. It is very important to set this property on messages that are involved in out-only invocations to prevent the Micro Integrator from registering unnecessary callbacks for response handling and eventually running out of memory. |
Description for value="true" |
Set this property to "true" on a message to indicate that no response message is expected for it once it is forwarded from the Micro Integrator. In other words, the Micro Integrator will do an out-only invocation with such messages. It is very important to set this property on messages that are involved in out-only invocations to prevent the Micro Integrator from registering unnecessary callbacks for response handling and eventually running out of memory. |
Description for value="false" |
ERROR_CODE¶
Parameter | Description |
---|---|
Name |
ERROR_CODE |
Possible Values |
string |
Default Behavior |
none |
Scope |
synapse |
Description |
Use this property to set a custom error code on a message which can be later processed by a Synapse fault handler. If the Synapse encounters an error during mediation or routing, this property will be automatically populated. |
Example |
ERROR_MESSAGE¶
Parameter | Description |
---|---|
Name |
ERROR_MESSAGE |
Possible Values |
string |
Default Behavior |
none |
Scope |
synapse |
Description |
Use this property to set a custom error message on a message which can be later processed by a Synapse fault handler. If the Synapse encounters an error during mediation or routing, this property will be automatically populated. |
Example |
ERROR_DETAIL¶
Parameter | Description |
---|---|
Name |
ERROR_DETAIL |
Possible Values |
string |
Default Behavior |
none |
Scope |
synapse |
Description |
Use this property to set the exception stacktrace in case of an error. If the Micro Integrator encounters an error during mediation or routing, this property will be automatically populated. |
Example |
ERROR_EXCEPTION¶
Parameter | Description |
---|---|
Name | ERROR_EXCEPTION |
Possible Values | java.lang.Exception |
Default Behavior | none |
Scope | synapse |
Description | Contains the actual exception thrown in case of a runtime error. |
TRANSPORT_HEADERS¶
Parameter | Description |
---|---|
Name |
TRANSPORT_HEADERS |
Possible Values |
java.util.Map |
Default Behavior |
Populated with the transport headers of the incoming request. |
Scope |
axis2 |
Description |
Contains the map of transport headers. Automatically populated. Individual values of this map can be accessed using the property mediator in the transport scope. |
Example |
messageType¶
Parameter | Description |
---|---|
Name |
messageType |
Possible Values |
string |
Default Behavior |
Content type of incoming request. |
Scope |
axis2 |
Description |
Message formatter is selected based on this property. This property should have the content type, such as text/xml, application/xml, or application/json. |
Example |
ContentType¶
Parameter | Description |
---|---|
Name |
ContentType |
Possible Values |
string |
Default Behavior |
Value of the Content-type header of the incoming request. |
Scope |
axis2 |
Description |
This property will be in effect only if the messageType property is set. If the messageType is set, the value of Content-Type HTTP header of the outgoing request will be chosen based on this property. Note that this property is required to be set only if the message formatter seeks it in the message formatter implementation. |
Example |
disableAddressingForOutMessages¶
Parameter | Description |
---|---|
Name |
disableAddressingForOutMessages |
Possible Values |
"true", "false" |
Default Behavior |
false |
Scope |
axis2 |
Description |
Set this property to "true" if you do not want the Micro Integrator to add WS-Addressing headers to outgoing messages. This property can affect messages sent to backend services as well as the responses routed back to clients. |
Example |
DISABLE_SMOOKS_RESULT_PAYLOAD¶
Parameter | Description |
---|---|
Name |
DISABLE_SMOOKS_RESULT_PAYLOAD |
Possible Values |
"true", "false" |
Default Behavior |
false |
Scope |
synapse |
Description |
If this property is set to |
Example |
ClientApiNonBlocking¶
Parameter | Description |
---|---|
Name |
ClientApiNonBlocking |
Possible Values |
"true", "false" |
Default Behavior |
true |
Scope |
axis2 |
Description |
By default, Axis2 spawns a new thread to handle each outgoing message. This property holds the primary thread until a VFS proxy writes to a VFS endpoint. You need to r emove this property from the message to change this behavior when queuing transports like JMS are involved. |
Example |
transportNonBlocking¶
Parameter | Description |
---|---|
Name |
transportNonBlocking |
Possible Values |
"true", "false" |
Default Behavior |
true |
Scope |
axis2 |
Description |
This property works the same way as |
Example |
TRANSPORT_IN_NAME¶
Parameter | Description |
---|---|
Name |
TRANSPORT_IN_NAME |
Scope |
synapse |
Description |
Mediation logic can read incoming transport name using this property (since WSO2 ESB 4.7.0) |
Example |
preserveProcessedHeaders¶
Parameter | Description |
---|---|
Name |
preserveProcessedHeaders |
Possible Values |
"true", "false" |
Default Behavior |
Preserving SOAP headers |
Scope |
synapse(default) |
Description |
By default, Synapse removes the SOAP headers of incoming requests that have been processed. If we set this property to 'true', Synapse preserves the SOAP headers. |
Example |
SERVER_IP¶
Parameter | Description |
---|---|
Name |
SERVER_IP |
Possible Values |
IP address or hostname of the Micro Integrator host |
Default Behavior |
Set automatically by the mediation engine upon startup |
Scope |
synapse |
FORCE_ERROR_ON_SOAP_FAULT¶
Parameter | Description |
---|---|
Name |
FORCE_ERROR_ON_SOAP_FAULT |
Possible Values |
"true", "false" |
Default Behavior |
true |
Scope |
synapse(default) |
Description |
When a SOAP error occurs in a response, the SOAPFault sent from the back end is received by the out sequence as a usual response by default. If this property is set to |
Example |
QUOTE_STRING_IN_PAYLOAD_FACTORY_JSON¶
Parameter | Description |
---|---|
Name |
QUOTE_STRING_IN_PAYLOAD_FACTORY_JSON |
Possible Values |
"true", "false" |
Default Behavior |
none |
Scope |
synapse |
Description |
When you create a JSON payload using the PayloadFactory mediator, a string value evaluated from an argument is replaced as it is. If you want to force double quotes to be added to a string value evaluated from an argument, set this property to Note Double quotes are added only if the value evaluated from an argument is string. If the value is a valid JSON number, boolean value or null, double quotes are not added. |
Example |
RabbitMQ Properties¶
The following generic properties can be used in the Property mediator and the Property Group mediator for RabbitMQ use cases.
SET_ROLLBACK_ONLY¶
Parameter | Description |
---|---|
Name | SET_ROLLBACK_ONLY |
Possible Values | true/false |
Scope | default |
Description | When a message is read from a RabbitMQ message queue, it will be sent to a service running in the backend. If a failure occurs, the Micro Integrator will do a basicReject with the requeue flag set to 'false'. In that case, the user must configure a Dead Letter Exchange to avoid losing messages. The same concept could be used to control the number of retries and to delay messages. Note that you need to set the SET_ROLLBACK_ONLY property in the fault handler (e.g., the fault sequence). |
Example |
SET_REQUEUE_ON_ROLLBACK¶
Parameter | Description |
---|---|
Name | SET_REQUEUE_ON_ROLLBACK |
Possible Values | true/false |
Scope | default |
Description | If this property is set to true in the fault sequence, when a message is read from a RabbitMQ message queue, the Micro Integrator will do a basicReject with the requeue flag set to 'true'. This allows RabbitMQ to immediately redeliver the rejected messages to the consumer. Note that you need to set the SET_REQUEUE_ON_ROLLBACK property in the fault handler (e.g., the fault sequence). |
Example |