Contact Free trial Login

Anypoint MQ Connector Reference - Mule 4

Support Version: Select

Anypoint MQ Connector Version 3.x

Anypoint MQ is a multitenant, cloud messaging service that enables customers to perform advanced asynchronous messaging among their applications.

Configurations


Config

Parameters

Name Type Description Default Value Required

Name

String

Specifies the name for this configuration. Connectors refer to the configuration by using this name.

x

Connection

Specifies the connection types to provide 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 purging. The platform purges expired instances as needed to free resources.

Connection Types

Connection
Parameters
Name Type Description Default Value Required

URL

String

The region URL for the queue from the Anypoint Platform > MQ console

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

Client App ID

String

The Client App ID from Anypoint Platform > MQ > Client Apps

x

Client Secret

String

The Client Secret field from Anypoint Platform > MQ > Client Apps

x

TLS Context

Tls

Host

String

Destination host for proxy requests

Port

Number

Destination port for proxy requests

Username

String

Username to authenticate against the proxy

Password

String

Password to authenticate against the proxy

Send Buffer Size

Number

Size of the buffer (in bytes) used when sending data, set on the socket itself

Receive Buffer Size

Number

Size of the buffer (in bytes) used when receiving data

Client Timeout

Number

SO_TIMEOUT value on sockets. Indicates the amount of time (in milliseconds) that the socket waits in a blocking operation before failing. A value of 0 (the default) indicates an indefinite wait.

Send TCP With No Delay

Boolean

If set, transmitted data is not grouped but sent immediately. Defaults to true.

true

Linger

Number

SO_LINGER value, which determines how long (in milliseconds) the socket takes to close so that any remaining data is transmitted correctly

Keep Alive

Boolean

SO_KEEPALIVE behavior on open sockets, which automatically checks open socket connections that are unused for long periods, and closes them if the connection becomes unavailable. This is a property on the socket itself and is used by a server socket to control whether connections to the server are kept alive before they are recycled.

false

Connection Timeout

Number

Number of milliseconds to wait until an outbound connection to a remote server is successfully created, before failing with a timeout. Defaults to 30 seconds.

30000

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the deployment connectivity test to each connector fails.

Operations

Associated Sources

Ack

<anypoint-mq:ack>

Executes an acknowledgment indicating that the message is consumed correctly and deletes the message from In Flight status.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use

x

Ack Token

String

Acknowledgment token used to perform manual ACK and NACK operations, in MANUAL mode only

x

Reconnection Strategy

Retry strategy in case of connectivity errors

For Configurations

Throws

  • ANYPOINT-MQ:ACKING

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:DESTINATION_NOT_FOUND

  • ANYPOINT-MQ:RETRY_EXHAUSTED

Consume

<anypoint-mq:consume>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use

x

Queue

String

Queue or Exchange name from which to fetch a message

x

Acknowledgment Mode

Enumeration, one of:

  • IMMEDIATE

  • MANUAL

Acknowledgment mode to use for the messages retrieved

IMMEDIATE

Acknowledgment Timeout

Number

Duration that a message is held by a consumer waiting for an acknowledgment or not acknowledgment. After that duration elapses, the message is again available to any consumer.

0

Acknowledgment Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to use in the acknowledgmentTimeout configuration

MILLISECONDS

Polling Time

Number

Time to wait for a message to be ready for consumption

10000

Polling Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to use in the pollingTime configuration

MILLISECONDS

Output Mime Type

String

MIME type of the operation output

Output Encoding

String

Encoding of the operation output

Streaming Strategy

Use repeatable streams

Target Variable

String

Name of a variable to store the operation’s output

Target Value

String

Expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

Output

Type

Binary

Attributes Type

For Configurations

Throws

  • ANYPOINT-MQ:ACKING

  • ANYPOINT-MQ:CONSUMING

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:TIMEOUT

  • ANYPOINT-MQ:DESTINATION_NOT_FOUND

  • ANYPOINT-MQ:RETRY_EXHAUSTED

Nack

<anypoint-mq:nack>

Executes a not acknowledgment and changes the status of the message from In Flight to In Queue for subscriber consumption

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use

x

Ack Token

String

Acknowledgment token used to perform manual ACK and NACK operations, in MANUAL mode only

x

Reconnection Strategy

Retry strategy in case of connectivity errors

For Configurations

Throws

  • ANYPOINT-MQ:NACKING

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:DESTINATION_NOT_FOUND

  • ANYPOINT-MQ:RETRY_EXHAUSTED

Publish

<anypoint-mq:publish>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use

x

Destination

String

Queue or Exchange name from which to fetch a message

x

Output Mime Type

String

MIME type of the operation output

Output Encoding

String

The encoding of the operation output

Streaming Strategy

Use repeatable streams

Body

Binary

Body of the outgoing message, sent as a string as part of a JSON message. Any content that is published must be capable of being serialized to and deserialized from string format. Sending Objects that don’t have a proper string serialization causes the message to be unreadable on the receiving end.

#[payload]

User Properties

Object

Custom user properties set to the message

Message Id

String

Valid custom user ID for the outgoing message. If not specified, the broker creates one.

Message Group Id

String

ID of the message group to which the published message belongs. Specify only for FIFO queues.

Delivery Delay

Number

Time to postpone delivery of the message before consumption: between 0 and 15 minutes.

MILLISECONDS

Delivery Delay Unit

Enumeration

Time unit to use in the Delivery Delay parameter:

  • MILLISECONDS

  • SECONDS

  • MINUTES

MILLISECONDS

Send Content-Type

Boolean

Set to true if the body type should be sent as an Anypoint MQ Message property

true

Target Variable

String

Name of a variable to store the operation output

Target Value

String

Expression to evaluate against the operation output. The expression outcome is stored in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

Output

Type

Binary

Attributes Type

For Configurations

Throws

  • ANYPOINT-MQ:PUBLISHING

  • ANYPOINT-MQ:CONNECTIVITY

  • ANYPOINT-MQ:ILLEGAL_BODY

  • ANYPOINT-MQ:DESTINATION_NOT_FOUND

  • ANYPOINT-MQ:RETRY_EXHAUSTED

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

Name of the configuration to use

x

Queue

String

Name of the queue from which messages are retrieved

x

Subscriber Type

One of:

Strategy to use when subscribing to messages from the service

Acknowledgment Mode

Enumeration, one of:

  • IMMEDIATE

  • AUTO

  • MANUAL

Acknowledgment mode to use for the messages retrieved

AUTO

Acknowledgment Timeout

Number

Duration that a message is held by a broker waiting for an acknowledgment or not acknowledgment before being made available to any subscriber. Specifies the default acknowledgmentTimeout value for all Subscriber sources, unless it is overridden.

0

Acknowledgment Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to use in the acknowledgmentTimeout configuration

MILLISECONDS

Circuit Breaker

Output Mime Type

String

MIME type of the operation output

Output Encoding

String

Encoding of the operation output

Primary Node Only

Boolean

Whether this source should only be executed on the primary node when running in a cluster

Streaming Strategy

Use repeatable streams

Redelivery Policy

Message redelivery policy

Reconnection Strategy

Retry strategy in case of connectivity errors

Output

Type

Binary

Attributes Type

For Configurations

Types

Tls

Field Type Description Default Value Required

Enabled Protocols

String

Comma-separated list of protocols enabled for this context

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context

Trust Store

Key Store

Revocation Check

Trust Store

Field Type Description Default Value Required

Path

String

Location of the trust store, resolved relative to the current classpath and file system, if possible

Password

String

Password used to protect the trust store

Type

String

Type of store used

Algorithm

String

Algorithm used by the trust store

Insecure

Boolean

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

Key Store

Field Type Description Default Value Required

Path

String

Location of the key store, resolved relative to the current classpath and file system, if possible

Type

String

Type of store used

Alias

String

When the key store contains many private keys, indicates the alias of the key that is used. If not defined, the first key in the file is used by default.

Key Password

String

Password used to protect the private key

Password

String

Password used to protect the key store

Algorithm

String

Algorithm used by the key store

Standard Revocation Check

Field Type Description Default Value Required

Only End Entities

Boolean

Verifies only the last element in the certificate chain

Prefer Crls

Boolean

Uses CRL-signing certificates before using OCSP-signing certificate

No Fallback

Boolean

Doesn’t use the secondary checking method (the one not selected for Prefer Crls)

Soft Fail

Boolean

Avoids verification failure when the revocation server cannot be reached or is busy

Custom OCSP Responder

Field Type Description Default Value Required

Url

String

URL of the OCSP responder

Cert Alias

String

Alias of the signing certificate for the OCSP response, if present. The signing certificate must be in the trust store.

CRL File

Field Type Description Default Value Required

Path

String

Path to the CRL file

Reconnection

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 deployment connectivity test to each connector fails.

Reconnection Strategy

Reconnection strategy to use

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often to reconnect, in milliseconds

Count

Number

How many reconnection attempts to make

blocking

Boolean

If false, the reconnection strategy runs in a separate, nonblocking thread

true

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often to reconnect, in milliseconds

blocking

Boolean

If false, the reconnection strategy runs in a separate, nonblocking thread

true

Expiration Policy

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

Anypoint MQ Message Attributes

Field Type Description Default Value Required

Destination

String

Message destination

x

Headers

Object

Message headers

x

Properties

Object

Message properties

x

Message Id

String

ID of the message

x

Delivery Count

Number

Number of times the message was delivered

x

Content Type

String

Content type of the message body

Ack Token

String

Acknowledgment token used to perform manual ACK and NACK operations, in MANUAL mode only

Circuit Breaker

Field Type Description Default Value Required

On Error Types

String

Error types that equal failure of the circuit when they occur during flow execution. By default, all errors result in failure.

Errors Threshold

Number

Of the errors considered by the circuit, how many must occur for the circuit to be opened.

x

Trip Timeout

Number

How long the circuit remains open after errorsThreshold is reached

x

Trip Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

The time unit bound to the tripTimeout value

MILLISECONDS

Repeatable In Memory Stream

Field Type Description Default Value Required

Initial Buffer Size

Number

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

Buffer Size Increment

Number

How much buffer size can expand. If set to 0 (zero) or less, STREAM_MAXIMUM_SIZE_EXCEEDED is raised when the buffer is full.

Max Buffer Size

Number

Maximum amount of memory to use before STREAM_MAXIMUM_SIZE_EXCEEDED is raised. If set to 0 (zero) or less, memory is unlimited.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit in which all these attributes are expressed

Repeatable File Store Stream

Field Type Description Default Value Required

Max In Memory Size

Number

Maximum amount of memory that the stream can hold locally before content is buffered to disk

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit in which maxInMemorySize is expressed

Redelivery Policy

Field Type Description Default Value Required

Max Redelivery Count

Number

Mximum 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

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

Id Expression

String

One or more expressions to use to determine when a message has been redelivered. Set only if useSecureHash is false.

Object Store

Object Store

Object store for the redelivery counter for each message

Anypoint MQ Message Publish Attributes

Field Type Description Default Value Required

Message Id

String

ID of the message that was published

x

Polling

Field Type Description Default Value Required

Scheduling Strategy

scheduling-strategy

Scheduling strategy for triggering the message fetch from the service

x

Prefetch

Field Type Description Default Value Required

Max Buffer Size

Number

Maximum number of messages to be prefetched from the service and kept locally before being dispatched to the flow

30

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.