TsgcWSPClient_sgc › Methods › RollBack
回滚当前事务并丢弃服务器上所有已排队的消息。
procedure RollBack(const aChannel: string = '');
| 名称 | 类型 | 描述 |
|---|---|---|
aChannel | const string | 要回滚的事务的可选信道范围。留空则回滚默认事务。 |
取消由 StartTransaction 启动的事务。在 StartTransaction 和 RollBack 之间发送的消息将在服务器端删除,不会传递给订阅者。
oProtocol.StartTransaction;
oProtocol.Publish('draft', 'news');
oProtocol.RollBack;