Skip to content

Message Bus#

The Message Bus task operates over the MessageBus communication layer. It enables publishing messages, sending messages with a request for a reply, and subscribing to specific subjects.

Message Bus

Warning

This task is deprecated and will be removed starting with version 12. Its functionality has been split into three separate actions: Message Bus Reply, Message Bus Send, and Message Bus Listener.

Workflows#

Data Flow Control Flow

Inputs#

Name Data Type Description
activate Boolean Activates the configured action type

Outputs#

Name Data Type Description
success Boolean true value emitted when the action is successfully performed
error Error Error emitted if processing fails or a timeout occurs while waiting for a SendRequest reply

Action Settings#

This task corresponds to one of three action types, selectable in the settings wizard. Each action type has its own inputs and outputs.

Action Type Publish#

1561732918756

This mode is activated when it receives a message or a true value in the activate input.

Upon activation, the task publishes the message to the specified subject (fire-and-forget). The success output then emits true.

Inputs#

Name Data Type IsTrigger Description
subject String No Subject of the message to be published
message any Yes Message to publish

Action Type SendRequest#

1561733291987

This mode is activated when it receives a message or a true value in the activate input.

Upon activation, the task sends a message that requests a reply.

If a reply is received within the configured timeout interval, both the data and success outputs emit their values. If no reply is received, a timeout occurs and an error output is emitted.

Inputs#

Name Data Type IsTrigger Description
subject String No Subject of the message to be sent
message any Yes Message to send

Outputs#

Name Data Type Description
data Object Emitted when a SendRequest receives a reply message

Action Type Subscribe#

1561733468540

The Subscribe action is activated by any of the following conditions:

  • Auto Activate setting is set to true;
  • activate input has a true Boolean value (or compatible, like 1, true, t, yes, y);
  • subject input is a different subject from the one already subscribed.

Upon activation, when a message is published to the subscribed subject, the data, subscribedSubject and success outputs will emit their respective values.

If the activate input receives a false boolean value, while a subscription is active, it is immediately deactivated.

Note

When a subscription receives a message from a SendRequest, it waits for the reply input to be provided with the reply message. The waiting period is defined in the Timeout setting. If no message is received during that interval, no reply is sent.

Inputs#

Name Data Type IsTrigger Description
subject String Yes Subject to be listening to. When a different subject is received, a new subscription is performed
reply Object No Message input to reply to a SendRequest

Outputs#

Name Data Type Description
subscribedSubject String To output the subject received from a Publish/SendRequest
data Object Emitted when a message is received from a Publish/SendRequest

Settings#

Name Data Type Possible Values Default Description
Action Enum Publish
SendRequest
Subscribe
Publish Type of action to be performed by the task.
Subject String Subject of the message to publish or subscribe.
Timeout Integer 60000 Number of milliseconds to wait for a reply message. Not applicable to action type Publish.
Auto Activate Boolean true For the action type Subscribe, if this flag is set to true, the task automatically subscribes to the specified subject.

1561733783455

Remarks#

This task uses a context-based data structure called a zone. For more information, see Zones page.