All Products
Search
Document Center

Blockchain as a Service:Blockchain as a Service:Message Queue

Last Updated:Mar 31, 2026

Configure BaaS to automatically publish blockchain events to Message Queue for Apache RocketMQ. When BaaS detects an event on a monitored channel — such as a smart contract event or a new block — it publishes a message to the specified RocketMQ topic. Subscribe to that topic to consume events in your downstream systems.

How it works

  1. An event occurs on the blockchain — for example, a smart contract event or a new block.

  2. BaaS detects the event and matches it against configured triggers.

  3. For each matching trigger, BaaS publishes a message to the configured RocketMQ topic.

  4. Your downstream application subscribes to the topic and processes the message.

Prerequisites

Before you begin, ensure that you have:

  • The cloud service integration module installed in your BaaS organization

  • Message Queue for Apache RocketMQ enabled (if not, complete the integration steps below first)

  • BaaS authorized to access Message Queue for Apache RocketMQ

Integrate BaaS with Message Queue for Apache RocketMQ

Complete this section once per organization. Skip to Set up a trigger if the integration is already active.

  1. In the My Organizations section, find the target organization and click Cloud service integration on the right side.

  2. Click the RocketMQ Message Queue tab.

  3. Click Condition detection to check the integration status.

  4. If Message Queue for Apache RocketMQ is not enabled, click Enable service.

  5. If BaaS is not authorized to access Message Queue for Apache RocketMQ, click Authorization Service.

  6. When the integration is complete, the console displays the configuration page shown below. Click Add Configuration to set up an event trigger.

    To add config

Set up a trigger

A trigger defines which blockchain events to watch and where to publish them.

Create a trigger

  1. On the RocketMQ Message Queue tab, click Add configuration.

  2. In the Add MQ configuration side pane, set the following parameters:

    ParameterDescription
    NameA name to identify this trigger
    Channel/networkThe fabric channel the trigger listens on
    Event typeThe type of events to push. See Subscribe to events for available types
    MQ domain nameThe HTTP endpoint of your MQ instance
    MQ instance nameThe MQ instance ID from your MQ instance details
    MQ TopicThe topic to publish messages to
    Message Tag(Optional) A tag to attach to published messages
    Failure threshold(Advanced) The number of accumulated failures before the trigger enters the failed state and stops processing all subsequent events. Set to -1 to allow unlimited failures — the trigger will never stop automatically
    Filter(Advanced, optional) A filter expression to narrow which events the trigger processes. See Use Filter
  3. Click Add. The trigger appears in the list.

    Creation completed

Manage triggers

After a trigger is created, three operations are available:

OperationDescription
EnableResumes event pushes. The trigger picks up from the latest block — events generated while the trigger was disabled are discarded
DisablePauses event pushes without deleting the trigger
DeletePermanently removes the trigger
Warning

Re-enabling a trigger does not replay missed events. Any events generated while the trigger was disabled are discarded. If event continuity matters for your application, plan disabling carefully.

Trigger behavior

Exception and retry

When the integrated service returns an error, or when a parameter configuration error occurs, the trigger status becomes Exception. The trigger retries automatically. If the retry fails multiple times, the event is discarded and counted as one failure.

  • Hover over Exception in the trigger list to see the error details.

  • If the accumulated failure count exceeds the Failure threshold, the trigger enters the failed state and stops processing all subsequent events.

Recovery

To recover a failed trigger:

  1. Repair the trigger configuration or the downstream service.

  2. Re-enable the trigger.

After re-enabling, the failure count resets to zero and the trigger resumes from the latest block.

Note

The Block height field in the trigger list shows the latest block the trigger has processed. Use this to monitor trigger progress.

What's next