Graphs describe who can send a message and how it is to be processed.
They are managed via the graph command of the xbusctl program.
Update or create a yaml file with the graph definition (‘graph.yml’ below).
Send it to Xbus via the graph save command of the xbusctl program:
xbusct graph save a_name 1.0 graph.yml
A version can be updated as long as its status is ‘draft’.
Activate the graph (will disable older versions)
xbusct graph status a_name 1.0 --active
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
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
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