Pipeline management¶
Piplines describe who can send a message and how it is to be processed.
They are managed via the pipeline
command of the xbusctl
program.
Publishing a new version of a pipeline¶
Update or create a yaml file with the pipeline definition (‘pipeline.yml’ below).
Send it to Xbus via the
pipeline save
command of the xbusctl program:xbusct pipeline save a_name 1.0 pipeline.yml
A version can be updated as long as its status is ‘draft’.
Activate the pipeline (will disable older versions)
xbusct pipeline status a_name 1.0 --active
Example pipeline descriptions¶
- Simple pipeline that sends any
test_event
toxbus-example-consumer
:
nodes:
- id: emitter
sourcematch:
eventtypes:
- test_event
inputs: []
outputs:
- default
- id: consumer
type: consumer
actorids: []
roles:
- xbus-example-consumer
rolebroadcast: true
sourcematch: null
inputs:
- default
outputs: []
edges:
- emitter.default->consumer.default
- Same pipeline but with a matching by role (only emitters registered to the
specified role may send a
test_event
) - note therolebroadcast
parameter being set totrue
in this case:
nodes:
- id: emitter
roles:
- xbus-example-emitter
rolebroadcast: true
sourcematch:
eventtypes:
- test_event
inputs: []
outputs:
- default
- id: consumer
type: consumer
actorids: []
roles:
- xbus-example-consumer
rolebroadcast: true
sourcematch: null
inputs:
- default
outputs: []
edges:
- emitter.default->consumer.default
- Same as the first pipeline but with an explicit emitter, specified by name:
nodes:
- id: emitter
type: emitter
actorids: []
roles: []
rolebroadcast: false
sourcematch:
eventtypes:
- test_event
inputs: []
outputs:
- default
- id: consumer
type: consumer
actorids: []
roles:
- xbus-example-consumer
rolebroadcast: true
sourcematch: null
inputs:
- default
outputs: []
edges:
- emitter.default->consumer.default