57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
|
|
spec_type: opensync
|
||
|
|
name: Message Queue Configuration
|
||
|
|
version: "1.0"
|
||
|
|
|
||
|
|
broker: rabbitmq
|
||
|
|
broker_version: "3.12"
|
||
|
|
|
||
|
|
queues:
|
||
|
|
published:
|
||
|
|
- name: order.created
|
||
|
|
description: Emitted when a new order is created
|
||
|
|
exchange: orders
|
||
|
|
routing_key: order.created
|
||
|
|
payload_schema:
|
||
|
|
type: object
|
||
|
|
properties:
|
||
|
|
order_id:
|
||
|
|
type: string
|
||
|
|
customer_id:
|
||
|
|
type: string
|
||
|
|
items:
|
||
|
|
type: array
|
||
|
|
total:
|
||
|
|
type: number
|
||
|
|
|
||
|
|
- name: payment.completed
|
||
|
|
description: Emitted when payment is confirmed
|
||
|
|
exchange: payments
|
||
|
|
routing_key: payment.completed
|
||
|
|
payload_schema:
|
||
|
|
type: object
|
||
|
|
properties:
|
||
|
|
payment_id:
|
||
|
|
type: string
|
||
|
|
order_id:
|
||
|
|
type: string
|
||
|
|
amount:
|
||
|
|
type: number
|
||
|
|
|
||
|
|
consumed:
|
||
|
|
- name: inventory.updated
|
||
|
|
description: Consumed to update product availability
|
||
|
|
exchange: inventory
|
||
|
|
routing_key: inventory.#
|
||
|
|
handler: InventoryHandler
|
||
|
|
|
||
|
|
- name: notification.send
|
||
|
|
description: Consumed to send notifications
|
||
|
|
exchange: notifications
|
||
|
|
routing_key: notification.*
|
||
|
|
handler: NotificationHandler
|
||
|
|
|
||
|
|
dlq:
|
||
|
|
enabled: true
|
||
|
|
max_retries: 3
|
||
|
|
retry_delay: 5000
|