TsgcWSPClient_STOMP_RabbitMQMethods › Disconnect

Disconnect Method

Sends a DISCONNECT frame and closes the STOMP session with the RabbitMQ broker.

Syntax

procedure Disconnect(const aGraceful: Boolean = True);

Parameters

NameTypeDescription
aGracefulconst BooleanIf 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.

Remarks

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.

Example

sgcRabbitMQ.Disconnect;

Back to Methods