Skip to content

Conversation

@ostrizhnii
Copy link

@ostrizhnii ostrizhnii commented Jun 14, 2019

Ticket: https://spryker.atlassian.net/browse/SM-207

Set up a middleware process which reads data from RabbitMq message and writes them into json file.

Also, implemented realtime-like behavior when messages queue is empty process waits till messages appear or a timeout is out.

Created console command to publish dummy messages: console queue:publish-messages -a 100 - where 100 is the amount of dummy messages.

To run middleware process run this command: console middleware:process:run -p RABBIT_MQ_INPUT

Required precondition:

  • composer install
  • console transfer:generate

Mykola added 5 commits June 13, 2019 12:54
* Provided console command to publish dummy messages: `console queue:publish-messages -a 100`
* To run middleware process run this command: `console middleware:process:run -p RABBIT_MQ_INPUT`
* If there is no messages process is waiting for messages for a configured time then terminated or procceed
$this->setName(static::COMMAND_NAME)
->setDescription(static::DESCRIPTION);

$this->addOption(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Options are optional and value can be required InputOption::VALUE_REQUIRED but in this case, the option is not optional, it will throw an exception because publishMessages expects a value, if you want to keep it as an option, you have to add a default value or make it an argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants