Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SM-207: RabbitMq input stream #18

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

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
composer.json Outdated Show resolved Hide resolved
$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.

3 participants