1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Example: IPC Worker Queue Configuration
#
# This example demonstrates using local IPC (Unix Domain Sockets on Unix/Linux/macOS,
# Named Pipes on Windows) for inter-process communication between worker processes.
#
# Use case: Send work to a local worker process on the same machine
# without the overhead of network protocols or external message brokers.
#
# Security: IPC transports rely on OS-level permissions:
# - Unix: Socket file permissions (default 0600, owner-only)
# - Windows: Named Pipe ACLs (default owner-only access)
metrics:
enabled: true
routes:
# Producer: HTTP endpoint that receives work and queues it via IPC
http_to_ipc:
input:
http:
bind: "127.0.0.1:8080"
path: "/submit"
output:
memory:
# IPC with default path resolution:
# Unix: /run/mq-bridge/work-queue.sock (or /tmp/mq-bridge/work-queue.sock)
# Windows: \\.\pipe\mq-bridge-work-queue
url: "ipc://work-queue"
capacity: 1000
# Worker: Consumes from IPC queue and processes work
ipc_worker:
concurrency: 4
batch_size: 10
input:
memory:
url: "ipc://work-queue"
capacity: 1000
# Note: enable_nack is automatically true for IPC transports
# (can be explicitly set to false if needed)
output:
http:
url: "http://localhost:9000/process"
method: POST
---
# Alternative: Explicit Unix socket path
#
# routes:
# http_to_ipc:
# input:
# http:
# bind: "127.0.0.1:8080"
# output:
# memory:
# # Explicit Unix socket path
# url: "unix:///var/run/myapp/work.sock"
# capacity: 1000
#
# ipc_worker:
# input:
# memory:
# url: "unix:///var/run/myapp/work.sock"
# capacity: 1000
---
# Alternative: Windows Named Pipe (explicit)
#
# routes:
# http_to_pipe:
# input:
# http:
# bind: "127.0.0.1:8080"
# output:
# memory:
# # Explicit Windows Named Pipe
# url: "pipe://myapp-work-queue"
# capacity: 1000
#
# pipe_worker:
# input:
# memory:
# url: "pipe://myapp-work-queue"
# capacity: 1000
---
# Comparison with in-process memory transport:
#
# In-process (single process, multiple threads):
# routes:
# http_to_memory:
# input:
# http:
# bind: "127.0.0.1:8080"
# output:
# memory:
# url: "memory://work-queue" # or just: topic: "work-queue"
# capacity: 1000
#
# memory_worker:
# concurrency: 8 # Multiple threads in same process
# input:
# memory:
# url: "memory://work-queue"
# capacity: 1000