TsgcWSPClient_STOMP_ActiveMQMethods › Disconnect

Disconnect Method

Sends a DISCONNECT frame to gracefully shut down the ActiveMQ STOMP session.

Syntax

procedure Disconnect(const aGraceful: Boolean = True);

Parameters

NameTypeDescription
aGracefulconst BooleanWhen True (default) a DISCONNECT frame with a receipt header is sent and the client waits for the broker to acknowledge before closing; when False the underlying WebSocket is simply dropped.

Remarks

A graceful DISCONNECT lets ActiveMQ guarantee that all previously sent frames have been processed before the connection is torn down, which is important when the last operation was a SEND that must not be lost. Use aGraceful := False only when an abrupt close is acceptable (for example during application shutdown after a fatal error).

Example

oActiveMQ.Disconnect;

Back to Methods