Chapter 12. Gateway
Abstract
The Fabric Gateway provides a TCP and HTTP gateway for discovery, load balancing and failover of services running in a fabric. The Fabric Gateway enables you to use standard HTTP URLs to access Web applications or Web services running in a fabric. In JBoss A-MQ, messaging clients can discover and connect to brokers over any supported messaging protocol (OpenWire, STOMP, MQTT, AMQP or WebSockets), letting the gateway handle the connection management to the real services running inside the fabric.
12.1. Gateway Architecture
How the gateway works
The gateway monitors and detects any changes in the ZooKeeper registry for all Web applications, Web services, servlets and message brokers. For all of the registered services, the gateway applies mapping rules to figure out how to expose those services through TCP or HTTP.
The ZooKeeper registry is automatically populated by Fabric when you deploy Web archives (WARs) or CXF based Web services.
Fabric 8 MQ Gateway
The MQ gateway binds to a single IP port and can accept connections from OpenWire, MQTT, STOMP, AMQP or HTTP clients. When it receives an HTTP connection, it will pass that connection to the HTTP Gateway. For the other protocols, it uses the host the client was trying to connect to to look up a broker fabric group by the same name.