Firebird/Concepts: Difference between revisions

From stonehomewiki
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 17: Line 17:
<div class="mw-collapsible-preview">wiring</div>
<div class="mw-collapsible-preview">wiring</div>
<div class="mw-collapsible-content">
<div class="mw-collapsible-content">
You can connect an output port to one ore more input port to set the data flow direction.
* You can connect an output port to one or more input ports.
* When you emit data via an output port, the data gets sends to all the input port that is connected, and the node owns those input will receive the data.
</div>
</div>
</div>
</div>
Line 52: Line 53:
<b>method: on_message</b>
<b>method: on_message</b>
<pre><nowiki>
<pre><nowiki>
on_message(self, port_name:str, data:Any)
on_message(self, port_id:str, data:Any)


Called when this node receives data. port_name is the name of the port which receive the data, data is the JSON payload of the data.
Called when this node receives data. port_id is the id of the port which receive the data, data is the JSON payload of the data.
</nowiki></pre>
</nowiki></pre>


Line 109: Line 110:
type:  Either PortType.INPUT or PortType.OUTPUT, represent it is a input port or output port
type:  Either PortType.INPUT or PortType.OUTPUT, represent it is a input port or output port
id:    ID of the port, it is unique within the node
id:    ID of the port, it is unique within the node
owner: The node which this port belongs to
node: The node which this port belongs to
</nowiki></pre>
</nowiki></pre>


Line 141: Line 142:
description: Detailed description of this pipeline.
description: Detailed description of this pipeline.
mq:          RabbitMQ instance
mq:          RabbitMQ instance
nodes:      Tuple containing all node belongs to this pipeline.
nodes:      Containing all node belongs to this pipeline.
</nowiki></pre>
</nowiki></pre>


Line 165: Line 166:
<div class="mw-collapsible-content">
<div class="mw-collapsible-content">
Represent a RabbitMQ connection
Represent a RabbitMQ connection
</div>
</div>
<p></p>
= Exception Handling =
<div class="toccolours mw-collapsible mw-collapsed expandable">
<div class="mw-collapsible-preview"></div>
<div class="mw-collapsible-content">
* When you register a pipeline, 3 message queue will be created, they are
* ${pipeline_name}: all the message gets routed here
* ${pipeline_name}-error: when a message failed to process, it will be posted here, it has following fields: error_count, recent_errors: array of {failed_time, error_message}
* ${pipeline_critical}-critical: when a message failed too many times, it will be moved here.
</div>
</div>
</div>
</div>
<p></p>
<p></p>

Latest revision as of 22:46, 16 September 2023

Firebird

Overview

Models

Exception Handling