Contact Us 1-800-596-4880

Configuring a Transport

You can configure a transport in the following ways:

  • Define a connector configuration using the <connector> element in the Mule XML configuration file.

  • Set transport properties on endpoints to customize the transport behavior for a single endpoint instance.

  • Use an endpoint URI that defines the scheme and connection information for the transport, such as tcp://localhost:12345. See Mule Endpoint URIs for more information. The URI consists of the protocol followed by transport-specific information, and then zero or more parameters to set as properties on the connector.

This page describes the common properties for all transports. The actual configuration parameters for each transport type are described separately for each transport. To see the details of a specific transport, see Transports Reference.

Common Connector Properties

All connectors require that you set the name attribute to a unique name for that connector. Additionally, they all include the following common properties.

Property Description Default Required

default-connector-exception-strategy

The exception strategy to use when errors occur in the connector.

No

receiver-threading-profile

The threading properties and WorkManager to use when receiving events from the connector.

The default receiver threading profile set on the Mule Configuration

Yes

dispatcher-threading-profile

The threading properties and WorkManager to use when dispatching events from the connector.

The default dispatcher threading profile set on the Mule Configuration.

Yes

connection-strategy

Desupported as of Mule 2.0. Use retry policies instead.

No

service-overrides

A map of service configuration values that can be used to override the default configuration for this transport.

No

createMultipleTransactedReceivers

Whether to create multiple concurrent receivers for this connector. This property is used by transports that support transactions, specifically receivers that extend the TransactedPollingMessageReceiver, and provides better throughput.

false

No

numberOfConcurrentTransactedReceivers

If createMultipleTransactedReceivers is set to true, the number of concurrent receivers that will be launched.

No

dynamicNotification

Whether to enable dynamic notification.

false

No

validateConnections

Causes Mule to validate connections before use. Note that this is only a configuration hint; transport implementations may or may not make an extra effort to validate the connection.

true

No

You can also set a Spring property on a connector. This is useful if you are using a custom connector.

Retry Policies

Retry policies are used to configure how a connector behaves when its connection fails. For complete information, see Configuring Reconnection Strategies.

Creating Your Own Transport

For information on creating a custom transport for Mule ESB, see Creating Transports.

Detailed Configuration Information

Receiver Threading Profile

The threading profile to use when a connector receives messages.

Attributes of receiver-threading-profile

Name Type Required Description

maxThreadsActive

int

no

The maximum number of threads to use.

maxThreadsIdle

int

no

The maximum number of idle or inactive threads that can be in the pool before they are destroyed.

doThreading

boolean

no

Whether threading should be used (default is true).

threadTTL

int

no

Determines how long an inactive thread is kept in the pool before being discarded.

poolExhaustedAction

enum

no

When the maximum pool size or queue size is bounded, this value determines how to handle incoming tasks. Possible values are: WAIT (wait until a thread becomes available; don’t use this value if the minimum number of threads is zero, in which case a thread may never become available), DISCARD (throw away the current request and return), DISCARD_OLDEST (throw away the oldest request and return), ABORT (throw a RuntimeException), and RUN (the default; the thread making the execute request runs the task itself, which helps guard against lockup).

threadWaitTimeout

int

no

How long to wait in milliseconds when the pool exhausted action is WAIT. If the value is negative, it waits indefinitely.

maxBufferSize

int

no

Determines how many requests are queued when the pool is at maximum usage capacity and the pool exhausted action is WAIT. The buffer is used as an overflow.

No child elements.

Dispatcher Threading Profile

The threading profile to use when a connector dispatches messages.

Attributes of dispatcher-threading-profile

Name Type Required Description

maxThreadsActive

int

no

The maximum number of threads to use.

maxThreadsIdle

int

no

The maximum number of idle or inactive threads that can be in the pool before they are destroyed.

doThreading

boolean

no

Whether threading should be used (default is true).

threadTTL

int

no

Determines how long an inactive thread is kept in the pool before being discarded.

poolExhaustedAction

enum

no

When the maximum pool size or queue size is bounded, this value determines how to handle incoming tasks. Possible values are: WAIT (wait until a thread becomes available; don’t use this value if the minimum number of threads is zero, in which case a thread may never become available), DISCARD (throw away the current request and return), DISCARD_OLDEST (throw away the oldest request and return), ABORT (throw a RuntimeException), and RUN (the default; the thread making the execute request runs the task itself, which helps guard against lockup).

threadWaitTimeout

int

no

How long to wait in milliseconds when the pool exhausted action is WAIT. If the value is negative, it waits indefinitely.

maxBufferSize

int

no

Determines how many requests are queued when the pool is at maximum usage capacity and the pool exhausted action is WAIT. The buffer is used as an overflow.

No child elements.

Service Overrides

Service overrides allow the connector to be further configured/customized by allowing parts of the transport implementation to be overridden, for example, the message receiver or dispatcher implementation, or the message adaptor that is used.

Attributes of service-overrides

There are no defaults or descriptions for these attributes. All attributes are strings and none are required. There are no child elements for service-overrides.

Attributes:

  • defaultExchangePattern

  • dispatcherFactory

  • endpointBuilder

  • inboundExchangePatterns

  • inboundTransformer

  • messageFactory

  • messageReceiver

  • outboundExchangePatterns

  • outboundTransformer

  • responseTransformer

  • serviceFinder

  • sessionHandler

  • transactedMessageReceiver

  • xaTransactedMessageReceiver