private function setupPools(ContainerBuilder $container)
    {
        $pools = $container->getParameter('gendoria_command_queue.pools');
        $usedServiceIds = array();
        foreach ($pools as $poolData) {
            $sendServiceId = substr($poolData['send_driver'], 1);
            if (in_array($sendServiceId, $usedServiceIds)) {
                throw new InvalidArgumentException(sprintf(
                    'Each pool has to have unique send service - duplicate service id "%s" found.',
                    $sendServiceId
                ));
            }
            if (!$container->hasDefinition($sendServiceId)) {
                throw new InvalidArgumentException('Non existing send driver service provided: ' . $poolData['send_driver'].'.');
            }
            $sendDriverReflection = new ReflectionClass($container->getDefinition($sendServiceId)->getClass());
            if (!$sendDriverReflection->implementsInterface(SendDriverInterface::class)) {
                throw new InvalidArgumentException(sprintf(
                    'Service "%s" does not implement interface "%s".',
                    $sendServiceId,
                    SendDriverInterface::class
                ));
            }
            $usedServiceIds[] = $sendServiceId;
        }
    }