Connection Management
ART provides sophisticated connection management with automatic failover, reconnection strategies, and multiple transport protocols. The ADK handles connection complexity transparently while giving you control over connection lifecycle and monitoring.
Connection States
ART maintains four distinct connection states that you can monitor and respond to:
- connected - Active real-time connection
- retrying - Attempting to reconnect after failure
- paused - Manually paused by user
- stopped - Connection terminated or max retries reached
- JavaScript
// Initiate the connection to the ART server
adk.connect();
// Monitor connection state
const currentState = adk.getState();
console.log('Connection state:', currentState);
Message Buffering and Privacy
ART implements a privacy-first approach to message handling with selective buffering based on connection states and channel types.
- Sender-Side Message Buffering: When a sender goes offline before message delivery, ART buffers messages locally and delivers them upon reconnection
- Receiver-Side Message Loss: ART does not store messages server-side to protect user privacy. If a receiver is offline when messages are sent, those messages are permanently lost
ART's message loss behavior is intentional and provides several privacy benefits:
- No Server Storage: Messages are never stored on ART servers
- Complete Privacy: No message history can be accessed or compromised
- Real-time Only: Communication is truly ephemeral
- Data Protection: Complies with strict privacy regulations
This privacy-first approach ensures that ART provides secure, ephemeral communication while giving you options for critical message delivery when needed.
To ensure that the messages are delivered regardless, enable guaranteed message delivery for the channel while creation.
Guaranteed message delivery is available only for Targeted and Encrypted Channel types.