Created
May 2, 2022 21:48
-
-
Save jeremymeng/a85b45db30bc093fc2b3fd28b0e59a59 to your computer and use it in GitHub Desktop.
haproxy for testing amqp custom endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0" | |
const sbClient = new ServiceBusClient(connectionString, { | |
customEndpointAddress: "sb://127.0.0.1", | |
// WebSocket works too | |
// customEndpointAddress: "https://127.0.0.1:3000", | |
// webSocketOptions: { | |
// webSocket: ws, | |
// }, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
stats timeout 30s | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
listen AMQP-5671 | |
bind *:5671 | |
mode tcp | |
option tcplog | |
maxconn 2000 | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
server jymtest jymtest.servicebus.windows.net:5671 check | |
listen AMQP-5672 | |
bind *:5672 | |
mode tcp | |
option tcplog | |
maxconn 2000 | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
server jymtest jymtest.servicebus.windows.net:5672 check | |
listen HTTPS-3000 | |
bind *:3000 | |
mode tcp | |
option tcplog | |
maxconn 2000 | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
server jymtest jymtest.servicebus.windows.net:443 check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --name running-haproxy -v /home/azuser/projects/haproxy/config:/usr/local/etc/haproxy:ro -p 5671:5671 -p 5672:5672 -p 3000:3000 -p 20936:20936 --sysctl net.ipv4.ip_unprivileged_port_start=0 haproxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment