Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

Anypoint MQ Connector Reference

Anypoint MQ is a multi-tenant, cloud messaging service that enables customers to perform advanced asynchronous messaging scenarios between their applications.

Default Subscriber Configuration

Parameters

Name Type Description Default Value Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types that can be provided to this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before the runtime considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. The runtime actually purges the instances when it sees fit.

Acknowledgement Mode

Enumeration, one of:

  • IMMEDIATE - An application receives a message and the MQ connector immediately acknowledges and deletes the message. Note: In Mule 3, this enum is called NONE - the functionality is the same.

  • AUTO - The Anypoint MQ connector automatically sends an Ack or Nack at the end of a flow depending on whether the MQ connector detects a Catch Exception Strategy (ACK) or a Rollback Exception Strategy (NACK).

  • MANUAL - An application indicates that it sends its own Ack or Nack using the Anypoint MQ connector local state.

Acknowledgement mode to use for the messages retrieved from the subscribers.

AUTO

Acknowledgement Timeout

Number

Duration that a message is held by a broker waiting for an Acknowledgement or Not Acknowledgement. After that duration elapses, the message is again available to any subscriber.

0

Polling Time

Number

How much time (milliseconds) to be waited if the requested messages are not ready to be consumed.

1000

Max Redelivery

Number

Number of redeliveries to try in case message processing fails. To avoid a poison message, the default value is set to -1 (infinite).

-1

Fetch Size

Number

Number of messages to receive when asking for messages. The response can contain fewer messages than this number depending on the poolingTime set.

10

Fetch Timeout

Number

Maximum duration in milliseconds to wait for the required amount of messages. If this duration elapses, the response is sent with as many messages as received during the period.

1000

Frequency

Number

Duration in milliseconds to execute the retrieve operation when the prefetch queue is not empty.

5000

Connection Type

Parameters

Name Type Description Default Value Required

URL

String

The MQ connector provides the URL depending on queue region. In Anypoint Platform > MQ, you can change your region and copy/paste the new URL into this field."

https://mq-us-east-1.anypoint.mulesoft.com/api/v1

Client App ID

String

In Anypoint Platform > MQ > Client Apps, click an app name (or create a new app) and click Copy for the Client App ID field. Paste this value in the Studio Client App ID field

x

Client Secret

String

In Anypoint Platform > MQ > Client Apps, click an app name (or create a new app) and click Copy for the Client Secret field. Paste this value in the Studio Client Secret field.

x

Proxy Config

TCP Client Socket Properties

TLS Context

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn't pass after exhausting the associated reconnection strategy

Pooling Profile

Characteristics of the connection pool

Associated Operations

Associated Sources

Operations

Ack

<anypoint-mq:ack>

Executes an Acknowledgement over a given AnypointMQMessageContext indicating that the message has been consumed correctly and deletes the message from in-flight status.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Message Context

AnypointMQMessageContext that represents the received message

x

Reconnection Strategy

A retry strategy in case of connectivity errors.

For Configurations

Throws

  • ANYPOINT-MQ:UNKNOWN

  • ANYPOINT-MQ:RETRY_EXHAUSTED

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:RESOURCE_NOT_FOUND

Consume

<anypoint-mq:consume>

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Destination

String

Queue or Exchange name from where to fetch a Message

x

Acknowledgement Mode

Enumeration, one of:

  • IMMEDIATE - An application receives a message and the MQ connector immediately acknowledges and deletes the message. Note: In Mule 3, this enum is known as NONE - the functionality is the same.

  • MANUAL - An application indicates that it sends its own Ack or Nack using the Anypoint MQ connector local state.

Acknowledgement mode to use for the messages retrieved from this subscriber. Can be only used 'MANUAL' or 'IMMEDIATE'.

MANUAL

Polling Time

Number

How much time (milliseconds) to be waited if the requested messages are not ready to be consumed.

10000

Acknowledgement Timeout

Number

Duration that a message is held by a broker waiting for an Acknowledgement or Not Acknowledgement. After that duration expires, the message is again available to any subscriber.

0

Output Mime Type

String

The mime type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Streaming Strategy

Configure if repeatable streams should be used and their behavior.

Target Variable

String

The name of a variable on which the operation's output will be placed.

Target Value

String

+++An expression to evaluate against the operation’s output and store the outcome of that expression in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

Output

Type

Binary

Attributes Type

For Configurations

Throws

  • ANYPOINT-MQ:UNKNOWN

  • ANYPOINT-MQ:RETRY_EXHAUSTED

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:RESOURCE_NOT_FOUND

Nack

<anypoint-mq:nack>

Executes an Not Acknowledgement over a given AnypointMQMessageContext and change the status of the message from in-flight to in-queue to be consumed again for a subscriber.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Message Context

AnypointMQMessageContext that represents the received message

x

Reconnection Strategy

A retry strategy in case of connectivity errors

For Configurations

Throws

  • ANYPOINT-MQ:UNKNOWN

  • ANYPOINT-MQ:RETRY_EXHAUSTED

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:RESOURCE_NOT_FOUND

Publish

<anypoint-mq:publish>

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Destination

String

Queue or Exchange name from where to fetch a Message

x

Body

Binary

Body of the message

#[payload]

Message Id

String

ID of the message to publish

Send Content Type

Boolean

Indicates whether the content type of the Mule Message should be attached or not

true

Properties

Object

Additional properties to be sent within the message

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Streaming Strategy

+++Configure if repeatable streams should be used and their behavior.

Target Variable

String

+++The name of a variable that stores the operation’s output.

Target Value

String

An expression to evaluate against the operation's output and stores the outcome of that expression in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

Output

Type

Binary

Attributes Type

For Configurations

Throws

  • ANYPOINT-MQ:UNKNOWN

  • ANYPOINT-MQ:RETRY_EXHAUSTED

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:RESOURCE_NOT_FOUND

Sources

Subscriber

<anypoint-mq:subscriber>

Anypoint MQ Subscriber Message Source, retrieves messages from the given destination name.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Destination

String

Queue name from where to retrieve messages.

x

Output Mime Type

String

The mime type of the payload that this operation outputs.

Output Encoding

String

The encoding of the payload that this operation outputs.

Redelivery Policy

Defines a policy for processing the redelivery of the same message

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Binary

Attributes Type

For Configurations

Proxy Parameter Group Type

Field Type Description Default Value Required

Host

String

Port

Number

Username

String

Password

String

TCP Client Socket Parameter Group

Field Type Description Default Value Required

Send Buffer Size

Number

Receive Buffer Size

Number

Client Timeout

Number

Send Tcp No Delay

Boolean

true

Linger

Number

Keep Alive

Boolean

false

Connection Timeout

Number

30000

TLS Type

Field Type Description Default Value Required

Enabled Protocols

String

A comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

A comma-separated list of cipher suites enabled for this context.

Trust Store

Key Store

Trust Store Type

Field Type Description Default Value Required

Path

String

The location (which will be resolved relative to the current classpath and file system, if possible) of the trust store.

Password

String

The password used to protect the trust store.

Type

String

The type of store used.

Algorithm

String

The algorithm used by the trust store.

Insecure

Boolean

If true, no certificate validations will be performed, rendering connections vulnerable to attacks. Use at your own risk.

Key Store Type

Field Type Description Default Value Required

Path

String

The location (which will be resolved relative to the current classpath and file system, if possible) of the key store.

Type

String

The type of store used.

Alias

String

When the key store contains many private keys, this attribute indicates the alias of the key that should be used. If not defined, the first key in the file will be used by default.

Key Password

String

The password used to protect the private key.

Password

String

The password used to protect the key store.

Algorithm

String

The algorithm used by the key store.

Reconnection Type

Field Type Description Default Value Required

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

Reconnection Strategy

The reconnection strategy to use

Reconnect Type

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

Count

Number

How many reconnection attempts to make.

Reconnect Forever Type

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

Pooling Profile Type

Field Type Description Default Value Required

Max Active

Number

Controls the maximum number of Mule components that can be borrowed from a session at one time. When set to a negative value, there is no limit to the number of components that may be active at one time. When maxActive is exceeded, the pool is said to be exhausted.

Max Idle

Number

Controls the maximum number of Mule components that can sit idle in the pool at any time. When set to a negative value, there is no limit to the number of Mule components that may be idle at one time.

Max Wait

Number

Specifies the number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the exhaustedAction is set to WHEN_EXHAUSTED_WAIT.

Min Eviction Millis

Number

Determines the minimum amount of time an object may sit idle in the pool before it is eligible for eviction. When non-positive, no objects are evicted from the pool due to idle time alone.

Eviction Check Interval Millis

Number

Specifies the number of milliseconds between runs of the object evictor. When non-positive, no object evictor is executed.

Exhausted Action

Enumeration, one of:

  • WHEN_EXHAUSTED_GROW

  • WHEN_EXHAUSTED_WAIT

  • WHEN_EXHAUSTED_FAIL

Specifies the behavior of the Mule component pool when the pool is exhausted. Possible values are: "WHEN_EXHAUSTED_FAIL", which throws a NoSuchElementException, "WHEN_EXHAUSTED_WAIT", which will block by invoking Object.wait(long) until a new or idle object is available, or WHEN_EXHAUSTED_GROW, which creates a new Mule instance and returns it, essentially making maxActive meaningless. If a positive maxWait value is supplied, it blocks for at most that many milliseconds, after which a NoSuchElementException is thrown. If maxThreadWait is a negative value, it blocks indefinitely.

Initialisation Policy

Enumeration, one of:

  • INITIALISE_NONE

  • INITIALISE_ONE

  • INITIALISE_ALL

Determines how components in a pool should be initialized. The possible values are:

  • INITIALISE_NONE - Load any components into the pool on startu.

  • INITIALISE_ONE - Load one initial component into the pool on startup.

  • INITIALISE_ALL - Load all components in the pool on startup.

Disabled

Boolean

Whether pooling should be disabled

Expiration Policy Type

Field Type Description Default Value Required

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute.

Redelivery Policy Type

Field Type Description Default Value Required

Max Redelivery Count

Number

The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message.

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

The secure hashing algorithm to use. If not set, the default is SHA-256.

Id Expression

String

Defines one or more expressions to use to determine when a message has been redelivered. This property may only be set if useSecureHash is false.

Object Store

The object store where the redelivery counter for each message is going to be stored.

Repeatable In Memory Stream Type

Field Type Description Default Value Required

Initial Buffer Size

Number

The amount of memory to allocate to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

Buffer Size Increment

Number

By how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

This is the maximum amount of memory that will be used. If more than that is used, then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower or equal to zero means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which all these attributes are expressed.

Repeatable File Store Stream Type

Field Type Description Default Value Required

Max In Memory Size

Number

Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed, it buffers the content on disk.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed.

Anypoint MQ Message Publish Attributes

Field Type Description Default Value Required

Message Id

String