OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Question about Message Queue Jobs and Transport Configuration

This topic contains 1 reply, has 1 voice, and was last updated by  icilisten 2 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #32554

    icilisten
    Participant

    I was working on “Message Queue Jobs and Transport Configuration”, but the Oro Documentation is not very clear about where (i.e., which file in which folder) to do the configuration. I have three questions:

    1) In which folder and which file can I locate this:

    <?php

    /** @var Oro\Component\MessageQueue\Client\MessageProducer $messageProducer **/
    $messageProducer = $container->get(‘oro_message_queue.message_producer’);

    2) In which folder and file can I create a message processor?

    <?php
    use Oro\Component\MessageQueue\Consumption\MessageProcessor;

    class FooMessageProcessor implements MessageProcessor, TopicSubscriberInterface
    {
    public function process(Message $message, Session $session)
    {
    echo $message->getBody();

    return self::ACK;
    // return self::REJECT; // when the message is broken
    // return self::REQUEUE; // the message is fine but you want to postpone processing
    }

    public static function getSubscribedTopics()
    {
    return [‘aFooTopic’];
    }
    }

    3) In which folder and file can I “Register it as a container service and subscribe to the topic”?

    oro_channel.async.change_integration_status_processor:
    class: ‘FooMessageProcessor’
    tags:
    – { name: ‘oro_message_queue.client.message_processor’ }

    Thanks so much for any guidance!

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #32555

    icilisten
    Participant

    For newbies like me, learn Symphony first before diving into Oro.

Viewing 1 replies (of 1 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No