Contact Free trial Login

VM Connector Reference

Support Category: Select

The VM Connector is used for intra app and inter app communication. The communication is done through asynchronous queues, which can be either transient or persistent. Transient queues are faster, but not reliable in the case of a system crash. Persistent queues, on the other hand are slower but reliable.

When running on a single instance, persistent queues work by serializing and storing the contents on to disk. When running in cluster mode, persistent queues are instead backed by the memory grid. This means that when a flow uses the VM connector to publish content to a queue, the Runtime decides whether to process that message in the same origin node or to send it out to the cluster for another node to pick it up. This is an easy way to distribute load across the cluster. In either way, transactions are always supported.

Each config defines its own set of queues. Those queues are only visible to components referencing that config.

Configurations


Config

Default 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

Queues

Array of Queue

The queues that this config owns.

x

Connection Types

Connection

Returns instances of VMConnection.

Parameters
Name Type Description Default Value Required

Reconnection

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.

 

Associated Operations

Associated Sources

Operations

Consume

<vm:consume>

Pull a message from a queue. If a message is not immediately available, the Consume operation waits for up to the configured queueTimeout value, after which a VM:QUEUE_TIMEOUT error is thrown.

The queue in which the content is published cannot contain a Listener (<vm:listener>) source.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

 

Queue Name

String

The name of the queue.

x

Timeout

Number

How long to wait on the queue to complete and operation (either publishing or consuming) before failing with a timeout error. The default is 5 seconds.

5

 

Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #timeoutUnit

SECONDS

 

Target Variable

String

The name of a variable in which the operation's output is placed.

 

Target Value

String

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

#[payload]

 

Reconnection Strategy

A retry strategy in case of connectivity errors.

 

Output

Type

Any

Attributes Type

For Configurations

Throws

  • VM:EMPTY_QUEUE  

  • VM:RETRY_EXHAUSTED  

  • VM:CONNECTIVITY  

Publish

<vm:publish>

Publishes the given content into the queue of the given queueName.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x 

Content

Any

The content to be published.

#[payload]

 

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

 

Queue Name

String

The name of the queue

x 

Timeout

Number

How long to wait on the queue to complete and operation (either publishing or consuming) before failing with a timeout error. The default is 5 seconds.

5

 

Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #timeoutUnit.

SECONDS

 

Reconnection Strategy

A retry strategy in case of connectivity errors.

 

For Configurations

Throws

  • VM:RETRY_EXHAUSTED  

  • VM:QUEUE_TIMEOUT  

  • VM:CONNECTIVITY  

Publish Consume

<vm:publish-consume>

Publishes the given content into a queue, and then waits up to the queueTimeout for a response to be supplied on a temporal reply-To queue that this operation automatically creates.

The temporal reply queue is automatically disposed after a response is received or the timeout expires.

The queue in which the content is published cannot contain a Listener (<vm:listener>) source.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Content

Any

the content to be published

#[payload]

 

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

 

Queue Name

String

The name of the queue

x

Timeout

Number

How long to wait on the queue to complete and operation (either publishing or consuming) before failing with a timeout error. The default is 5 seconds.

5

 

Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #timeoutUnit

SECONDS

 

Target Variable

String

The name of a variable in which the operation's output is placed.

 

Target Value

String

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

#[payload]

 

Reconnection Strategy

A retry strategy in case of connectivity errors.

 

Output

Type

Any

Attributes Type

For Configurations

Throws

  • VM:RETRY_EXHAUSTED  

  • VM:QUEUE_TIMEOUT  

  • VM:CONNECTIVITY  

Sources

Listener

<vm:listener>

A source that creates and listens on VM queues. VM queues are created by placing listeners on them, which is why this listener contains parameters for a queue's behavior, such as it being persistent or not, the max capacity, etc.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x 

Number Of Consumers

Number

The number of concurrent consumers to be placed on the queue. As the number of consumers increases, so does the speed at which this source pushes messages into the owning flow. The default is 4 concurrent consumers.

4

 

Transactional Action

Enumeration, one of:

  • ALWAYS_BEGIN

  • NONE

The type of beginning action that sources can take regarding transactions.

NONE

 

Transaction Type

Enumeration, one of:

  • LOCAL

  • XA

The type of transaction to create. Availability will depend on the runtime version.

LOCAL

 

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

 

Queue Name

String

The name of the queue.

x 

Timeout

Number

How long to wait on the queue to complete and operation (either publishing or consuming) before failing with a timeout error. The default is 5 seconds.

5

 

Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #timeoutUnit

SECONDS

 

Reconnection Strategy

A retry strategy in case of connectivity errors.

 

Content

Any

#[payload]

 

Output

Type

Any

Attributes Type

For Configurations

Types

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 test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

The reconnection strategy to use.

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

Count

Number

How many reconnection attempts to make.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

Queue

Field Type Description Default Value Required

Queue Name

String

x

Queue Type

Enumeration, one of:

  • TRANSIENT

  • PERSISTENT

TRANSIENT

Max Outstanding Messages

Number

0

VM Message Attributes

Field Type Description Default Value Required

Queue Name

String

Timestamp

DateTime

Redelivery Policy

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

ObjectStore

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

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub