Advertisement
thehunmonkgroup

Reference YAML for messaging architecture

Nov 20th, 2023
1,746
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.09 KB | None | 0 0
  1. resources:
  2.   - name: resource_a
  3.     subscribes_to:
  4.      - queue_1
  5.     restricted_publish_exchanges: # Optional: Restricts publishing to these exchanges
  6.       - exchange_1
  7.       - exchange_2
  8.       - exchange_3
  9.     default_pathways: # Dict of pathway names to lists of exchanges
  10.       pathway_a:
  11.        - exchange_1
  12.         - exchange_2
  13.       pathway_b:
  14.        - exchange_3
  15.  
  16.   - name: resource_b
  17.     subscribes_to:
  18.      - queue_2
  19.     # No 'restricted_publish_exchanges' key means resource_b can publish to any exchange
  20.     default_pathways: # Dict of pathway names to lists of exchanges
  21.       pathway_c:
  22.        - exchange_1
  23.  
  24. exchanges:
  25.   - name: exchange_1
  26.     type: direct
  27.   - name: exchange_2
  28.     type: topic
  29.   - name: exchange_3
  30.     type: fanout
  31.  
  32. queues:
  33.   - name: queue_1
  34.     exchange: exchange_1
  35.     routing_key: key_1
  36.     priority: 5
  37.   - name: queue_2
  38.     exchange: exchange_2
  39.     routing_key: key_2
  40.     priority: 10
  41.  
  42. bindings:
  43.   - exchange: exchange_1
  44.     queue: queue_1
  45.     routing_key: key_1
  46.   - exchange: exchange_2
  47.     queue: queue_2
  48.     routing_key: key_2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement