What are the Slack Archives?

Itโ€™s a history of our time together in the Slack Community! Thereโ€™s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you wonโ€™t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi, Is there a way to make RabbitMQ Queues default to Lazy?

Posts: 12 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

Hi,
Is there a way to make RabbitMQ Queues default to Lazy?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • SRE @ Spryker Sprykee Posts: 1,654 โœจ - Novice

    Locally using docker-sdk?
    In our PaaS they are lazy by default but RMQ is deployed a bit differently than locally using docker-sdk.

  • Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    yes it is possible...
    in src/Pyz/Client/RabbitMq/RabbitMqConfig.php add this method:

        /**
         * @param string $queueName
         * @param string $routingKey
         *
         * @return \Generated\Shared\Transfer\RabbitMqOptionTransfer
         */
        protected function createQueueOptionTransfer($queueName, $routingKey = ''): RabbitMqOptionTransfer
        {
            $queueOptionTransfer = parent::createQueueOptionTransfer($queueName, $routingKey);
    
            $queueOptionTransfer->setArguments(['x-queue-mode' => 'lazy']);
    
            return $queueOptionTransfer;
        }
    

    IMPORTANTE: U have to remove all queues before this changes are applied and queue:setup called...

  • Posts: 56 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    In my opinion, you should be careful about setting all queues to 'lazy' mode. This is because all messages are then saved on the data storage medium. Especially in the 'sync.*'. queues, depending on the amount of data in the shop, there can be several 100K messages. This could be a performance impact.

Welcome!

It looks like you're new here. Sign in or register to get started.