-
Notifications
You must be signed in to change notification settings - Fork 3
/
amqp_bridge.yaml
97 lines (90 loc) · 2.63 KB
/
amqp_bridge.yaml
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
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 127.0.0.1, port_value: 9901 }
static_resources:
listeners:
- name: amqp_in
address:
socket_address: { address: 0.0.0.0, port_value: 18000 }
filter_chains:
- filters:
- name: envoy.filters.network.amqp_server
- name: envoy.http_connection_manager
config:
stat_prefix: amqp_in
route_config:
virtual_hosts:
- name: localhost
domains: ["*"]
routes:
- match: { prefix: "/" }
route: { cluster: http_out }
http_filters:
- name: envoy.router
config: {}
- name: http_in
address:
socket_address: { address: 0.0.0.0, port_value: 15672 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: http_in
route_config:
virtual_hosts:
- name: localhost
domains: ["*"]
routes:
- match: { prefix: "/2" }
route: { cluster: amqp_out2 }
- match: { prefix: "/" }
route: { cluster: amqp_out }
http_filters:
- name: envoy.router
config: {}
- name: amqp_in2
address:
socket_address: { address: 0.0.0.0, port_value: 18001 }
filter_chains:
- filters:
- name: envoy.filters.network.amqp_server
config:
bridge:
id: "amqp_in2"
sources: "amqp_in2-link"
- name: envoy.http_connection_manager
config:
stat_prefix: amqp_in
route_config:
virtual_hosts:
- name: localhost
domains: ["*"]
routes:
- match: { prefix: "/" }
route: { cluster: http_out }
http_filters:
- name: envoy.router
config: {}
clusters:
- name: http_out
max_requests_per_connection: 1 # WEBrick buggy keep-alive. Need better test.
connect_timeout: 0.25s
type: STATIC
hosts: [{ socket_address: { address: 127.0.0.1, port_value: 8000 }}]
- name: amqp_out
filters:
- name: envoy.filters.network.amqp_client
connect_timeout: 0.25s
type: STATIC
hosts: [{ socket_address: { address: 127.0.0.1, port_value: 5672 }}]
- name: amqp_out2
filters:
- name: envoy.filters.network.amqp_client
config:
bridge:
id: "amqp_out2"
named_relay: "amqp_out2-link"
connect_timeout: 0.25s
type: STATIC
hosts: [{ socket_address: { address: 127.0.0.1, port_value: 5672 }}]