AMQP 1.0 Protocol

The OASIS standard for advanced messaging. Connect to Azure Service Bus, Apache Qpid, and any AMQP 1.0 compliant broker from Delphi.

TsgcWSPClient_AMQP1

AMQP 1.0 subprotocol client — sessions, sender and receiver links, Claims-Based-Security tokens for Azure Service Bus, over a WebSocket or raw-TCP carrier.

Classe do componente

TsgcWSPClient_AMQP1

Protocolo

AMQP 1.0

Plataformas

Windows, macOS, Linux, iOS, Android

Edição

Professional / Enterprise

Drop the component, set a few properties, go

CreateSession, then CreateSenderLink / CreateReceiverLink, then send and receive. CBS helpers wrap Azure Service Bus SAS / OAuth.

uses
  sgcWebSocket, sgcWebSocket_Protocol_AMQP1_Client, sgcAMQP1_Classes;

var
  WSClient: TsgcWebSocketClient;
  AMQP1: TsgcWSPClient_AMQP1;
  oSession: TsgcAMQP1Session;
  oSender:  TsgcAMQP1SenderLink;
begin
  WSClient := TsgcWebSocketClient.Create(nil);
  WSClient.Host := 'broker.example.com';
  WSClient.Port := 5673;

  AMQP1 := TsgcWSPClient_AMQP1.Create(nil);
  AMQP1.Client := WSClient;

  AMQP1.OnAMQPConnect      := AMQPConnect;
  AMQP1.OnAMQPMessage      := AMQPMessage;
  AMQP1.OnAMQPSessionOpen  := AMQPSessionOpen;
  AMQP1.OnAMQPLinkOpen     := AMQPLinkOpen;

  WSClient.Active := True;

  oSession := AMQP1.CreateSession;
  oSender  := AMQP1.CreateSenderLink(oSession, '/queue/orders');
  // Receivers handle pushed deliveries through OnAMQPMessage
  AMQP1.CreateReceiverLink(oSession, '/queue/orders');
end;

O que tem por dentro

5 published properties, 12 methods, 14 events — pulled from the component reference.

Connection

Published properties: Client, Broker, Guid.

Messaging

Events: OnAMQPMessage, OnAMQPMessageSent, OnAMQPMessageSentAck.

Authentication

Events: OnAMQPSASLAuthentication.

Sessions

Methods: CreateSession, CloseSession.

Lifecycle

Events: OnAMQPConnect, OnAMQPDisconnect, OnAMQPClose.

Advanced

Methods: WriteData.

Especificações & referências

Authoritative sources for the protocols this component implements.

Documentação & Demos

Acesse a referência do componente, pegue o projeto demo pronto para executar e baixe a versão de avaliação.

Projeto demo — Demos\Protocols\AMQP\100 Exemplo pronto para executar. Acompanha o pacote sgcWebSockets — baixe a versão de avaliação abaixo.
Documento técnico (PDF) Recursos, início rápido, exemplos de código para Delphi & C++ Builder e referências de fontes primárias — somente deste componente.
Manual do usuário (PDF) Manual completo cobrindo todos os componentes da biblioteca.

Ready to Get Started with AMQP 1.0?

Download the free trial and connect to Azure Service Bus or any AMQP 1.0 broker.