Configuration name.
Required: Yes
Default: None
The General tab fields are:
Studio Field | Description |
---|---|
Name |
Configuration name. Required: Yes |
Client Mode |
Specifies whether the Anypoint MQ connector uses an improved HTTP client (SYNC, the default) or a deprecated HTTP client provided by the Mule Runtime (MULE). The improved HTTP client can be either synchronous or asynchronous. Possible values:
Required: No |
Provider: |
Sets a provider configuration for the current app consisting of the URL, Client App ID, and Client Secret. Required: Yes |
URL |
Region URL shown in Anypoint Platform. Specify the URL for the region you want your MQ queues and exchanges to reside. See MQ Regions. Substitute the region name in this URL:
Required: Yes |
Client App ID |
From Anypoint Platform > MQ > Client Apps. Click the app and copy the Client App ID value. Required: Yes |
Client Secret |
From Anypoint Platform > MQ > Client Apps. Click the app and copy the Client Secret value. Required: Yes |
Use Global Provider Config |
Sets the URL, Client App ID, and Client Secret for all apps. Required: No |
Basic Settings: |
Number of redeliveries to try in case a message fails. -1 indicates that Anypoint MQ retry indefinitely. If set to the default value of -1, this parameter does not appear in the XML flow. Required: No |
(Basic Settings menu in Studio) Defines how the Anypoint MQ messages are acknowledged when the message are removed from being inflight messages. If set to the default value of AUTO, this parameter does not appear in the XML flow. Possible values are:
Required: No |
|
Acknowledgement Timeout |
(Basic Settings menu in Studio) When you take an Anypoint MQ message from a queue, the broker puts it in flight, and the message remains in that state until the ACK is performed (application reads the message and Anypoint MQ deletes it), or the Acknowledgement Timeout is reached. If ACK is performed, then the message is removed from the queue, if Acknowledgement Timeout is reached, the message returns to the queue. If set to the default
value of Required: No |
Polling Time |
(Basic Settings menu in Studio) Maximum time in milliseconds to wait for the expected message or messages. If set to the default value of Required: No |
Threading Profile Settings |
Define threading profile behavior or use default worker threading profile. See Tuning Performance. The threading profile options let you optimize connector performance for use with Anypoint MQ. Note: After setting the threading profile fields, save your project, click Configuration XML, change the name of the threading profile statement to start with anypoint-mq, and switch the order of the statement with the anypoint-mq:provider statement in the anypoint-mq:config block. The location can be N. Virginia (us-east-1), Ireland (eu-west-1), Singapore (ap-southeast-1), Sydney (ap-southeast-2), or Oregon (us-west-2). This example shows how the finished statements may appear:
Required: No |
Use custom worker threading profile |
See Tuning Performance. Required: No |
Max Active Threads |
The maximum number of threads to use. See Tuning Performance. Required: No |
Max Idle Threads |
The maximum number of idle or inactive threads that can be in the pool before they are destroyed. See Tuning Performance. The thread pool does not grow from Max Idle Threads towards Max Active Threads unless the queue is completely filled up. Required: No |
Thread TTL |
Thread time to live duration. Required: No |
Pool Exhausted Action |
When the maximum pool size or queue size is bounded, this value determines how to handle incoming tasks. Possible values are:
Required: No |
Thread Wait Timeout |
Thread wait timeout in milliseconds. Required: No |
Max Buffer Size |
Max buffer size. Required: No |
XML Element | Description |
---|---|
doc:name |
Configuration name. Required: Yes
|
clientMode |
Specifies whether the Anypoint MQ connector uses an improved HTTP client (SYNC, the default) or a deprecated HTTP client provided by the Mule Runtime (MULE). The improved HTTP client can be either synchronous or asynchronous. Possible values:
Required: No
|
provider |
Sets a provider configuration for the current app consisting of the URL, Client App ID, and Client Secret. Required: Yes
|
url |
Region URL shown in Anypoint Platform. Possible values are:
FIFO queues can reside in US East, US West, EU Ireland and Sydney. Required: Yes XML Example:
|
clientId |
From Anypoint Platform > MQ > Client Apps. Click the app and copy the Client App ID value. Required: Yes
|
clientSecret |
From Anypoint Platform > MQ > Client Apps. Click the app and copy the Client Secret value. Required: Yes
|
provider-ref |
Sets the URL, Client App ID, and Client Secret for all apps. Required: No
|
maxRedelivery |
Number of redeliveries to try in case a message fails. -1 indicates that Anypoint MQ retry indefinitely. If set to the default value of -1, this parameter does not appear in the XML flow. Required: No
|
acknowledgementMode |
Defines how the Anypoint MQ messages are acknowledged when the message are removed from being inflight messages. If set to the default value of AUTO, this parameter does not appear in the XML flow. Possible values are:
Required: No
|
acknowledgementTimeout |
The amount of time in milliseconds to take an Anypoint MQ message from a queue, the broker puts it in flight, and the message remains in that state until the ACK is performed (application reads the message and Anypoint MQ deletes it), or the Acknowledgement Timeout is reached. If ACK is performed, then the message is removed from the queue, if Acknowledgement Timeout is reached, the message returns to the queue. If set to the default
value of Required: No
|
pollingTime |
Maximum time in milliseconds to wait for the expected message or messages. If set to the default value of Required: No
|
worker-threading-profile |
Define threading profile behavior or use default worker threading profile. See Tuning Performance. The threading profile options let you optimize connector performance for use with Anypoint MQ. Note: After configuring worker-threading-profile, change the name of the statement to start with anypoint-mq, and switch the order of the statement with the anypoint-mq:provider statement in the anypoint-mq:config block. This example shows how the finished statements should appear:
Required: No
|
maxThreadsActive |
The maximum number of threads to use. See Tuning Performance. Required: No
|
maxThreadsIdle |
The maximum number of idle or inactive threads that can be in the pool before they are destroyed. See Tuning Performance. The thread pool does not grow from Max Idle Threads towards Max Active Threads unless the queue is completely filled up. Required: No
|
threadTTL |
Thread time to live duration in milliseconds. Required: No
|
poolExhaustedAction |
When the maximum pool size or queue size is bounded, this value determines how to handle incoming tasks. Possible values are:
Required: No
|
threadWaitTimeout |
Thread wait timeout in milliseconds. Type: Long
|
maxBufferSize |
Max buffer size. Type: Integer
|
XML Element | Description |
---|---|
anypoint-mq:<operation> |
Operation that this connector instance performs. Possible values:
Required: Yes
|
The TSL/SSL and Proxy tabs share the same information as the HTTP Connector.
Lets you set the number of messages to receive at once when asking for messages. The response can contain fewer messages than this number depending on the Polling Time
(pollingTime
in XML) setting.
When you subscribe a flow to an Anypoint MQ queue, the flow pool regularly polls the queue looking for messages. This operation can be very time consuming. In order to avoid delays, prefetch was introduced. This is a component placed between the flow and the Anypoint MQ queue that polls the queue regularly, but without processing the pooled messages. You can change these values depending on your site’s performance and use case needs.
Note: Only global prefetch is supported; however prefetch within the MQ connector’s configuration (anypoint-mq:config) is not supported.
The Prefetch tab fields are:
Value | Description |
---|---|
Fetch Size |
Number of messages to prefetch. † |
Fetch Timeout |
Maximum duration in milliseconds to wait for the required amount of messages. When this time elapses, the response is sent with as many messages as taken during the period. |
Frequency |
The duration in milliseconds to execute the retrieve operation when the prefetch queue is not empty. |
Fetch Retry Attempts |
(v1.3.0 and later) Number of times to retry prefetching in case of an error. Default value is -1 (infinite). |
Fetch Retry Wait Time |
(v1.3.0 and later) The duration in milliseconds to wait after a prefetching error before retrying. |
† Fetch Size Notes:
For best performance, set Fetch Size
to 10 (maximum value) and reduce Frequency
to increase the polling time and the resulting dequeuing of transactions per second (TPS). You can increase Fetch Timeout
if message processing is slow. For example, if processing takes 5 seconds, set the Fetch Timeout
to at least double this time (10000 milliseconds).
If Fetch Size is greater than 1, multiple messages are requested at the same time. This has the effect of launching separate messages though the Mule flow, potentially concurrently, depending on the Mule worker thread configuration (see Tuning Performance for thread configuration information).
Fetch Size does not guarantee messages process in parallel, some messages may, others do not.
Apart from these performance-related parameters, it is important to properly configure the Acknowledgement Mode.
The equivalent XML for the Prefetch default values is:
<anypoint-mq:prefetch fetchSize="10" fetchTimeout="1000" frequency="5000"/>
Studio Field | Description |
---|---|
Operation |
Operation that this connector instance performs. Possible values:
Required: Yes |
Studio Field | Description |
---|---|
Destination |
Queue or message exchange name. Required: Yes |
Message ID |
Optional ID of a message to publish. When publishing to FIFO queues, if you specify a custom Message ID and the Message ID is the same on multiple messages, the messages with the same Message ID cannot be redelivered. For applications such as those used in transactional use cases where messages need to be processed exactly once, Anypoint MQ supports exactly once delivery of messages when messages are published to FIFO queues. FIFO queues supports deduplication of messages. For example, if you retry sending a message with the same message ID within the 5-minute deduplication interval to a FIFO queue, Anypoint MQ guarantees the messages with the same message ID are retrieved and processed exactly once by the subscriber. When building applications requiring this feature on Anypoint Studio, you can set the message ID in publisher settings inside Anypoint MQ connector. If a message ID is not explicitly set, MQ auto generates a unique message ID for each message that’s sent to a queue. Required: No |
Send Outbound Properties |
Send properties when publishing. Required: Yes |
Send Content Type |
Send content type when publishing. Required: Yes |
Property |
Optional property content to set for publish. Required: No |
Value |
Optional value content to set for publish. Required: No |
Studio Field | Description |
---|---|
Destination |
Queue name. Required: Yes |
Acknowledgement Mode |
If you use
the Anypoint MQ connector as a message processor, the operations are Required: No |
Acknowledgement Timeout |
Duration in milliseconds until the acknowledgement mode times out. Note: This value overrides the Acknowledgement Timeout field in the Global Elements Properties Basic Settings. |
Polling Time |
Duration in milliseconds that the MQ connector polls the queue or message exchange for messages. Note: This value overrides the Polling Time field in the Global Elements Properties Basic Settings. The default is 10000 milliseconds (10 seconds). |
Reconnection Wait Time |
Duration in milliseconds for how long to wait before MQ attempts to re-establish a connection to the MQ backend server. The default is 3000 milliseconds (3 seconds). |
Reconnection Attempts |
Number of times MQ should attempt to re-establish a connection to the MQ backend server. -1 means try forever. |
Studio Field | Description |
---|---|
Destination |
Queue name. Required: Yes |
Acknowledgement Mode |
When the MQ connector is used as an entry point, the mode options are Notes:
Required: No |
Acknowledgement Timeout |
Duration in milliseconds until the acknowledgement mode times out. Note: This value overrides the Acknowledgement Timeout field in the Global Elements Properties Basic Settings. |
Polling Time |
Duration in milliseconds that the MQ connector polls a queue for messages. Note: This value overrides the Polling Time field in the Global Elements Properties Basic Settings. |
Reconnection Wait Time |
Duration in milliseconds for how long to wait before MQ attempts to re-establish a connection to the MQ backend server. The default is 3000 milliseconds (3 seconds). |
Reconnection Attempts |
Number of times MQ should attempt to re-establish a connection to the MQ backend server. -1 means try forever. |
XML Element | Description |
---|---|
destination |
Queue or message exchange name. Required: Yes
|
messageId |
Optional ID of a message to publish. When publishing to FIFO queues, if you specify a custom Message ID and the Message ID is the same on multiple messages, the messages with the same Message ID will not be redelivered. For applications such as those used in transactional use cases where messages need to be processed exactly once, Anypoint MQ supports exactly once delivery of messages when messages are published to FIFO queues. FIFO queues supports deduplication of messages. For example, if you retry sending a message with the same message ID within the 5-minute deduplication interval to a FIFO queue, Anypoint MQ guarantees the messages with the same message ID are retrieved and processed exactly once by the subscriber. When building applications requiring this feature on Anypoint Studio, you can set the message ID in publisher settings inside Anypoint MQ connector. If a message ID is not explicitly set, MQ auto generates a unique message ID for each message that’s sent to a queue. Required: No
|
sendOutboundProperties |
Send properties when publishing. Required: Yes
|
sendContentType |
Send content type when publishing. Required: Yes
|
propertyName |
Optional property content to set for publish. Required: No
|
value |
Optional value content to set for publish. Required: No source,xml,linenums] <anypoint-mq:properties> <anypoint-mq:property propertyName="THisisAProperty" value="4254"/> </anypoint-mq:properties> |
XML Element | Description |
---|---|
destination |
Queue or message exchange name. Required: Yes
|
acknowledgementMode |
The modes are Required: No
|
acknowledgementTimeout |
Duration in milliseconds until the acknowledgement mode times out. Required: No
|
pollingTime |
Duration in milliseconds that the MQ connector polls the queue or message exchange for messages. Required: No
|
reconnectionWaitTime |
Duration in milliseconds to wait before attempting to reconnect to the MQ backend server. Required: No
|
reconnectionAttempts |
Number of attempts to make to re-establish a connection to the MQ backend server. The -1 default value indicates to retry forever. Required: No
|
XML Element | Description |
---|---|
destination |
Queue name. Required: Yes
|
acknowledgementMode |
The mode options are Required: No
|
acknowledgementTimeout |
Duration in milliseconds until the acknowledgement mode times out. Required: No
|
pollingTime |
Duration in milliseconds that the MQ connector polls a queue for messages. Required: No
|
reconnectionWaitTime |
Duration in milliseconds to wait before attempting to reconnect to the MQ backend server. Required: No
|
reconnectionAttempts |
Number of attempts to make to re-establish a connection to the MQ backend server. The -1 default value indicates to retry forever. Required: No
|