TsgcWSPClient_AMQP1 › Methods › CreateSenderLink
Attaches an AMQP 1.0 sender link to an existing session and returns it, ready to publish messages to the supplied target address.
function CreateSenderLink(const aSession: string; const aName: string = ''; const aTarget: string = ''; const aOptions: TsgcAMQP1MethodOptions_CreateSenderLink = nil) : TsgcAMQP1SenderLink;
| 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. |
aTarget | const string | Target node address messages will be sent to — for example a queue or topic name, or an Azure Service Bus entity path. |
aOptions | const TsgcAMQP1MethodOptions_CreateSenderLink | Optional Attach options (snd-settle-mode, rcv-settle-mode, durable/expiry-policy/timeout, source address, desired-capabilities, link credit). |
The newly attached TsgcAMQP1SenderLink instance, usable with SendMessage once the peer confirms the Attach. (TsgcAMQP1SenderLink)
In AMQP 1.0 data flows over unidirectional links attached to a session. A sender link has role false (sender) and transfers messages from this container to the peer node addressed by aTarget. The method writes an attach performative with the supplied name, target and options, and when the peer mirrors it the link becomes attached. OnAMQPLinkOpen fires at that point and OnAMQPMessageSentAck afterwards reports delivery outcomes. Use CloseLink to detach.
oSender := oAMQP1.CreateSenderLink('session_1', 'sender_1', 'queue-orders');