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
An event occurs on the blockchain — for example, a smart contract event or a new block.
BaaS detects the event and matches it against configured triggers.
For each matching trigger, BaaS publishes a message to the configured RocketMQ topic.
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.
In the My Organizations section, find the target organization and click Cloud service integration on the right side.
Click the RocketMQ Message Queue tab.
Click Condition detection to check the integration status.
If Message Queue for Apache RocketMQ is not enabled, click Enable service.
If BaaS is not authorized to access Message Queue for Apache RocketMQ, click Authorization Service.
When the integration is complete, the console displays the configuration page shown below. Click Add Configuration to set up an event trigger.

Set up a trigger
A trigger defines which blockchain events to watch and where to publish them.
Create a trigger
On the RocketMQ Message Queue tab, click Add configuration.
In the Add MQ configuration side pane, set the following parameters:
Parameter Description Name A name to identify this trigger Channel/network The fabric channel the trigger listens on Event type The type of events to push. See Subscribe to events for available types MQ domain name The HTTP endpoint of your MQ instance MQ instance name The MQ instance ID from your MQ instance details MQ Topic The 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 Click Add. The trigger appears in the list.

Manage triggers
After a trigger is created, three operations are available:
| Operation | Description |
|---|---|
| Enable | Resumes event pushes. The trigger picks up from the latest block — events generated while the trigger was disabled are discarded |
| Disable | Pauses event pushes without deleting the trigger |
| Delete | Permanently removes the trigger |
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:
Repair the trigger configuration or the downstream service.
Re-enable the trigger.
After re-enabling, the failure count resets to zero and the trigger resumes from the latest block.
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
Subscribe to events — learn about available event types
Use Filter — narrow down which events a trigger processes