-
Notifications
You must be signed in to change notification settings - Fork 15
ThunderBroker
Vinod Sathyaseelan edited this page Aug 14, 2025
·
3 revisions
The Thunder Broker is a specialized component in Ripple that manages communication with Thunder plugins through WebSocket connections.
The Thunder Broker provides a reliable communication channel between Ripple and Thunder plugins. It handles connection management, request routing, and event subscription for Thunder-based services.
- Manages WebSocket connections to Thunder
- Handles request/response cycles
- Manages subscriptions to Thunder events
- Provides connection pooling capabilities
-
ThunderCallMessage
- Used for one-time RPC calls
- Contains method, parameters, and callback
-
ThunderSubscribeMessage
- Used for event subscriptions
- Manages ongoing event streams
- Contains module, event name, and handlers
-
ThunderUnsubscribeMessage
- Handles subscription cleanup
- Removes event listeners
- Automatic reconnection handling
- Connection state monitoring
- Token-based authentication support
- Pooled connections for better resource utilization
- Asynchronous request processing
- Response transformation
- Error handling and recovery
- Request queuing during reconnection
- Event subscription tracking
- Multiple handler support per subscription
- Automatic resubscription after reconnection
- Subscription cleanup on disconnect
- Plugin activation checking
- Automatic plugin activation
- Plugin state monitoring
- Version compatibility checking
- Connected
- Disconnected
- Reconnecting
- Error
- Request received from client
- Message wrapped in appropriate Thunder format
- Sent through WebSocket connection
- Response received and transformed
- Result returned to client
- Subscribe request received
- Thunder subscription established
- Event handlers registered
- Events forwarded to handlers
- Subscription maintained across reconnections
The Thunder Broker implements comprehensive error handling:
- Connection failures
- Message timeouts
- Plugin activation failures
- Subscription errors
- Response validation
- Multiple connections managed
- Load balancing across connections
- Connection reuse
- Pool size management
- Groups related messages
- Reduces connection overhead
- Improves throughput
- Plugin state caching
- Connection state caching
- Response caching where appropriate
- Make sure that the plugin is activated before sending requests
- Implement proper error handling
- Clean up subscriptions when no longer needed
- Monitor connection health
- Use appropriate timeout values
- Handle reconnection scenarios gracefully
© 2025 RDK Management, LLC (and contributors). Firebolt® is a registered mark of its owner.