publish method
Publish a message
Implementation
Future<void> publish(String topic, String message) async {
try {
if (!_container.isRegistered(PubSubHandler)) {
throw StateError('PubSubHandler not available');
}
await _container.get<PubSubHandler>().publish(topic, message);
} catch (e) {
_logger.error('Failed to publish: $e');
rethrow;
}
}