TsgcWSPClient_sgcMethods › RollBack

RollBack Method

Rolls back the current transaction and discards all queued messages on the server.

Syntax

procedure RollBack(const aChannel: string = '');

Parameters

NameTypeDescription
aChannelconst stringOptional channel scope of the transaction to roll back. Leave empty to roll back the default transaction.

Remarks

Cancels the transaction started by StartTransaction. Messages that were sent between StartTransaction and RollBack are deleted server-side and are never delivered to subscribers.

Example

oProtocol.StartTransaction;
oProtocol.Publish('draft', 'news');
oProtocol.RollBack;

Back to Methods