TsgcWSPClient_AMQP1 › Methods › CreateReceiverLink
Attaches an AMQP 1.0 receiver link to an existing session and returns it, ready to consume messages from the supplied source address.
function CreateReceiverLink(const aSession: string; const aName: string = ''; const aSource: string = ''; const aOptions: TsgcAMQP1MethodOptions_CreateReceiverLink = nil) : TsgcAMQP1ReceiverLink;
| Name | Type | Description |
|---|---|---|
aSession | const string | Name of the session previously returned by CreateSession. The link is attached to this session's channel. |
aName | const string | Link name advertised in the Attach frame. Must be unique within the session for a given role. Blank generates one automatically. |
aSource | const string | Source node address messages will be read from — for example a queue or topic subscription, or an Azure Service Bus entity path. |
aOptions | const TsgcAMQP1MethodOptions_CreateReceiverLink | Optional Attach options (snd-settle-mode, rcv-settle-mode, initial credit, durable/expiry-policy, filter map, distribution-mode, desired-capabilities). |
The newly attached TsgcAMQP1ReceiverLink instance which will deliver messages through OnAMQPMessage. (TsgcAMQP1ReceiverLink)
A receiver link has role true (receiver) and transfers messages from the peer's aSource node to this container. The method writes an attach performative with the given name, source and options, grants initial link credit and, when the peer mirrors the Attach, OnAMQPLinkOpen fires. Every subsequent Transfer from the broker is surfaced via OnAMQPMessage together with a DeliveryState var parameter so the handler can accept, reject, release or modify the delivery. Use CloseLink to detach.
oReceiver := oAMQP1.CreateReceiverLink('session_1', 'receiver_1', 'queue-orders');