start method
Starts the STOMP service
Implementation
Future<void> start() async {
if (_isStarted) {
throw const StompStateException('Service already started', 'started', 'stopped');
}
_logger.info('Starting STOMP service on ${_host.id}');
// Start server if enabled
if (_options.enableServer) {
_server = StompServer(
host: _host,
serverName: _options.serverName,
timeout: _options.timeout,
);
await _server!.start();
_logger.info('STOMP server started');
}
_isStarted = true;
_logger.info('STOMP service started');
}