TsgcWSPClient_AMQP1 › Methods › CreateCBSLink
Attaches the pair of links to the reserved $cbs management node used by Azure Service Bus / Event Hubs for Claims-Based Security.
function CreateCBSLink(const aName: string; const aSession: string = '') : TsgcAMQP1SenderLink;
| Name | Type | Description |
|---|---|---|
aName | const string | Local identifier stored for the pair of links. Pass the same value later to PutCBSToken / CloseLink. |
aSession | const string | Session to attach the $cbs links to. Leave blank to use (or lazily create) the default CBS session. |
The sender half of the CBS link pair; the receiver is created implicitly and fed into the reply correlation used by PutCBSToken. (TsgcAMQP1SenderLink)
Azure Service Bus and Event Hubs (and any AMQP 1.0 broker that implements the OASIS "AMQP Claims-Based Security 1.0" draft) expose a reserved management node at address $cbs. Authorisation works by attaching a sender link to $cbs to push put-token messages and a receiver link to read the responses. This method attaches both, using a generated reply-to for correlation, and returns the sender so the caller can invoke PutCBSToken against it. It must be called once per AMQP 1.0 connection, before creating any working sender/receiver links that rely on the tokens.
oCbs := oAMQP1.CreateCBSLink('cbs_1', 'session_1');