TsgcWSPClient_Dataset › Methods › StartTransaction
Begins a new transaction; subsequent messages are queued until Commit or RollBack.
procedure StartTransaction(const aChannel: string = '');
| Name | Type | Description |
|---|---|---|
aChannel | const string | Optional channel scope of the transaction. Leave empty to start a default transaction. |
Opens a transaction on the server for this client. Messages sent afterwards are held in a queue and are only dispatched to subscribers when Commit is called, or discarded when RollBack is called.
oProtocol.StartTransaction;
oProtocol.Publish('msg1', 'news');
oProtocol.Publish('msg2', 'news');
oProtocol.Commit;