TsgcWSPClient_AMQPProperties › Client

Client Property

References the TsgcWebSocketClient that carries AMQP 0-9-1 frames when connecting over WebSockets.

Syntax

property Client: TsgcWSComponent_WSClient read FClient write SetClient;

Default Value

nil

Remarks

Drop a TsgcWebSocketClient on the form and assign it to Client to run AMQP 0-9-1 over WebSockets. The WebSocket client manages the transport (host, port, TLS, proxy, HTTP headers and subprotocol negotiation) while this component implements the AMQP frame layer (methods, content headers, content bodies, heartbeats, channels) on top. After assignment the AMQP client issues Connection.StartOk automatically when the WebSocket handshake completes. Brokers that expose AMQP over WebSocket (for example RabbitMQ with the Web-STOMP / Web-MQTT style Web-AMQP plugin) typically listen on port 15674 and advertise amqp as the WebSocket subprotocol, reached via Specifications.RFC6455 := True. Set Specifications.RFC6455 to False on the TsgcWebSocketClient to fall back to raw TCP; use Broker instead for a dedicated TCP component.

Example


oClient := TsgcWebSocketClient.Create(nil);
oClient.Host := 'www.esegece.com';
oClient.Port := 5672;
oAMQP := TsgcWSPClient_AMQP.Create(nil);
oAMQP.Client := oClient;
oClient.Specifications.RFC6455 := False;
oClient.Active := True;

Back to Properties