Delivery Guarantees
The Valmi Value SDK provides at-least-once delivery:- Events are guaranteed to be delivered at least once
- Events may be delivered multiple times (deduplication handled server-side)
- Events are never lost (buffered locally if API unavailable)
Offline Buffering
Events are automatically buffered locally when:- Network is unavailable
- API is temporarily down
- Rate limits are hit
Buffer Behavior
- Automatic Buffering: Events are stored locally
- Automatic Retry: SDK retries sending buffered events
- Buffer Size: Configurable buffer size (default: 100 events)
- Flush Interval: Automatic flush every N seconds (default: 5)
Buffer Configuration
Retry Logic
The SDK automatically retries failed requests:- Max Retries: Configurable (default: 3)
- Exponential Backoff: Retries with increasing delays
- Retryable Errors: Network errors, 5xx status codes
- Non-Retryable Errors: 4xx errors (except rate limits)
Retry Configuration
Deduplication
Server-side deduplication prevents duplicate events:- Event IDs: Each event gets a unique ID
- Deduplication Window: 24-hour deduplication window
- Automatic Handling: No action required from you
Error Handling
Network Errors
Network errors are handled automatically:- Events are buffered locally
- SDK retries when connection is restored
- No data loss
Invalid Requests
Invalid requests return errors:Rate Limiting
Rate limits are handled gracefully:- Events are buffered when rate limited
- SDK automatically retries with backoff
- No data loss
Manual Flush
Manually flush buffered events:Graceful Shutdown
Close the client gracefully:Performance
The SDK is designed for performance:- Non-Blocking: Sends events asynchronously
- Batch Support: Efficient batch sending
- Minimal Overhead: Low performance impact
- Connection Pooling: Reuses connections
Monitoring
Monitor SDK health:- Event Count: Track events sent
- Error Rate: Monitor error rates
- Buffer Size: Monitor buffer usage
- Retry Count: Track retry attempts