STOMP met ActiveMQ

Verbind je Delphi-toepassingen met Apache ActiveMQ via STOMP over WebSocket. Toegang tot queues, topics en duurzame abonnementen vanuit native code.

TsgcWSPClient_STOMP_ActiveMQ

STOMP 1.0- / 1.1- / 1.2-client afgestemd op Apache ActiveMQ. Abonneer op /topic/-, /queue/- en broker-specifieke destinations, ACK/NACK en transacties.

Componentklasse

TsgcWSPClient_STOMP_ActiveMQ

Protocol

STOMP 1.2 voor ActiveMQ

Platforms

Windows, macOS, Linux, iOS, Android

Editie

Professional / Enterprise

Plaats het component, stel enkele eigenschappen in, klaar

Koppel aan een TsgcWebSocketClient, stel Authentication in, abonneer op /topic/- of /queue/-destinations en publiceer tekst- of binary-frames.

uses
  sgcWebSocket, sgcWebSocket_Protocol_STOMP_ActiveMQ_Client;

var
  WSClient: TsgcWebSocketClient;
  STOMP: TsgcWSPClient_STOMP_ActiveMQ;
begin
  WSClient := TsgcWebSocketClient.Create(nil);
  WSClient.Host := 'broker.example.com';
  WSClient.Port := 61614;

  STOMP := TsgcWSPClient_STOMP_ActiveMQ.Create(nil);
  STOMP.Client := WSClient;
  STOMP.Authentication.Enabled  := True;
  STOMP.Authentication.UserName := 'admin';
  STOMP.Authentication.Password := 'admin';

  STOMP.OnSTOMPConnected := STOMPConnected;
  STOMP.OnSTOMPMessage   := STOMPMessage;

  WSClient.Active := True;
end;

procedure TForm1.STOMPConnected(Connection: TsgcWSConnection;
  const Session, Server: string);
begin
  STOMP.SubscribeQueue('orders');
  STOMP.PublishQueue('orders', 'hello');
end;

Wat zit erin

9 gepubliceerde eigenschappen, 16 methoden, 6 gebeurtenissen — uit de componentreferentie.

Verbinding

Gepubliceerde eigenschappen: Client, Broker, Versions.

Messaging

Gebeurtenissen: OnActiveMQMessage, OnActiveMQReceipt.

Betrouwbaarheid

Gepubliceerde eigenschappen: HeartBeat.

Beveiliging

Gepubliceerde eigenschappen: Authentication.

Lifecycle

Gebeurtenissen: OnActiveMQConnected, OnActiveMQDisconnected, OnActiveMQError.

Geavanceerd

Methoden: WriteData.

Specificaties & referenties

Autoritatieve bronnen voor de protocollen die dit component implementeert.

Documentatie & demo's

Direct linken naar de componentreferentie, het kant-en-klare demoproject pakken en de proefversie downloaden.

Demoproject — Demos\Protocols\STOMP\ActiveMQ Kant-en-klaar voorbeeldproject. Zit in het sgcWebSockets-pakket — download hieronder de proefversie.
Technisch document (PDF) Functies, snelstart, codevoorbeelden voor Delphi & C++ Builder en primaire bronverwijzingen — alleen dit component.
Gebruikershandleiding (PDF) Uitgebreide handleiding voor elk component in de bibliotheek.

Klaar om verbinding te maken met ActiveMQ?

Download de gratis proefversie en integreer binnen enkele minuten met ActiveMQ.