public function __construct(PubSubDriverInterface $driver)
{
if (!$driver->isPubSubSupported()) {
throw new NotSupportedException('Driver does not support Pub/Sub messaging.');
}
$this->driver = $driver;
$this->event_dispatcher = new EventDispatcher();
}