TsgcWSPClient_STOMP_RabbitMQ › Methods › Disconnect
Sends a DISCONNECT frame and closes the STOMP session with the RabbitMQ broker.
procedure Disconnect(const aGraceful: Boolean = True);
| Name | Type | Description |
|---|---|---|
aGraceful | const Boolean | If True (default) a DISCONNECT frame with a receipt header is sent and the component waits for the broker RECEIPT confirming that all previous frames were processed before closing the socket. If False the WebSocket is closed immediately. |
Use a graceful disconnect to guarantee that any pending SEND or ACK frames have been received by RabbitMQ before the TCP connection is torn down. After Disconnect returns the OnRabbitMQDisconnected event is fired.
sgcRabbitMQ.Disconnect;