TsgcWSPClient_AMQP1Properties › Client

Client Property

References the TsgcWebSocketClient that carries AMQP 1.0 frames when tunnelling the protocol 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 1.0 over WebSockets. The WebSocket client owns the transport (host, port, TLS, proxy, HTTP headers and subprotocol negotiation) while this component implements the AMQP 1.0 frame layer on top (protocol header AMQP\x00\x01\x00\x00, Open/Begin/Attach/Transfer/Disposition/Detach/End/Close frames, SASL layer and heartbeats driven by IdleTimeout). Once the WebSocket handshake succeeds the subprotocol writes the 8-byte AMQP header and issues Open automatically. Azure Service Bus, ActiveMQ Artemis and other AMQP 1.0 brokers that expose a WebSocket endpoint typically advertise the amqp subprotocol — set Specifications.RFC6455 := True and point the WebSocket client at the broker URL. Set Specifications.RFC6455 to False on the WebSocket client (or use Broker instead) to speak raw TCP/TLS.

Example


oClient := TsgcWebSocketClient.Create(nil);
oClient.Host := 'contoso.servicebus.windows.net';
oClient.Port := 443;
oClient.TLS := True;
oAMQP1 := TsgcWSPClient_AMQP1.Create(nil);
oAMQP1.Client := oClient;
oClient.Active := True;

Back to Properties