TsgcWSPClient_STOMP_ActiveMQProperties › Client

Client Property

References the TsgcWebSocketClient that carries STOMP frames to the ActiveMQ broker 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 the ActiveMQ STOMP adapter over WebSockets. The WebSocket client manages the transport (host, port, TLS, proxy, HTTP headers and subprotocol negotiation) while this component implements the STOMP frame layer and the ActiveMQ-specific JMS extensions on top. After assignment the STOMP client sends CONNECT automatically once the WebSocket handshake completes: configure host/port on the TsgcWebSocketClient to target the ActiveMQ WebSocket transport connector (for example ws://host:61614/stomp when the broker is configured with a ws:// connector) and set Active := True. The protocol component negotiates one of v12.stomp, v11.stomp or v10.stomp via the Sec-WebSocket-Protocol header, based on the flags in Versions. Use Broker instead when you need raw TCP on ports 61613/61614.

Example


WSClient := TsgcWebSocketClient.Create(nil);
WSClient.Host := 'localhost';
WSClient.Port := 61614;
STOMP := TsgcWSPClient_STOMP_ActiveMQ.Create(nil);
STOMP.Client := WSClient;
WSClient.Active := True;

Back to Properties