TsgcWSPClient_sgc › 메서드 › StartTransaction
새 트랜잭션을 시작합니다. 이후 메시지는 Commit 또는 RollBack까지 큐에 들어갑니다.
procedure StartTransaction(const aChannel: string = '');
| Name | Type | 설명 |
|---|---|---|
aChannel | const string | 트랜잭션의 선택적 채널 범위입니다. 기본 트랜잭션을 시작하려면 비워 두십시오. |
이 클라이언트에 대해 서버에서 트랜잭션을 엽니다. 이후에 보낸 메시지는 큐에 보관되며 Commit이 호출될 때만 구독자에게 디스패치되거나, RollBack이 호출될 때 폐기됩니다.
oProtocol.StartTransaction;
oProtocol.Publish('msg1', 'news');
oProtocol.Publish('msg2', 'news');
oProtocol.Commit;