php-enqueue / enqueue-dev

Message Queue, Job Queue, Broadcasting, WebSockets packages for PHP, Symfony, Laravel, Magento. DEVELOPMENT REPOSITORY - provided by Forma-Pro
https://enqueue.forma-pro.com/
MIT License
2.17k stars 430 forks source link

[ExclusiveCommandExtension] report every message #1282

Closed DanilAlekseevich closed 1 year ago

DanilAlekseevich commented 1 year ago

I get '[ExclusiveCommandExtension] This is a exclusive command queue and client's properties are not set. Setting them'log for every input message is my service, why? Where setting this property?! My properties array empty.

I use symfony bundle.

For start processor using console command: php bin/console enqueue:consume --setup-broker

my Processor:

class OrderStatusUpdateProcessor implements Processor, CommandSubscriberInterface, QueueSubscriberInterface
{
    public const QUEUE_NAME = 'global.order.status.update';

    public static function getSubscribedQueues(): array
    {
        return [self::QUEUE_NAME];
    }

    public static function getSubscribedCommand(): array
    {
        return [
            'command' => self::QUEUE_NAME,
            'queue' => self::QUEUE_NAME,
            'prefix_queue' => false,
            'exclusive' => true,
        ];
    }

    public function process(Message $message, Context $context): string
    {

        any code

        return self::ACK;
    }
}

my enqueue.yaml:

enqueue:
  default:
    transport: '%env(resolve:ENQUEUE_DSN)%'
    client: null
DanilAlekseevich commented 1 year ago

Done