TsgcWSPClient_AMQPEvents › OnAMQPHeartBeat

OnAMQPHeartBeat Event

Fires every time a heartbeat frame is exchanged with the server.

Syntax

property OnAMQPHeartBeat: TsgcAMQPHeartBeatEvent;
// TsgcAMQPHeartBeatEvent = procedure(Sender: TObject) of object

Default Value

Remarks

AMQP 0.9.1 allows peers to agree on a heartbeat interval so each side can detect a half-open connection. When HeartBeat.Enabled is True and the negotiated interval has elapsed, the client sends an empty heartbeat frame to the server and will also receive one back; this event is fired on every incoming or outgoing heartbeat. It is typically used for diagnostics, uptime logs or to refresh a watchdog timer.

Example

procedure TForm1.oAMQPAMQPHeartBeat(Sender: TObject);
begin
  DoLog('#AMQP HeartBeat');
end;

Back to Events