Skip to content

Commit

Permalink
readme.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammetsafak committed Aug 31, 2024
1 parent 337feca commit 59e51ac
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 40 deletions.
33 changes: 0 additions & 33 deletions App/Commands/Mail/MailConsumer.php

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php
namespace App\Commands\SMS;
namespace App\Commands;
use App\Queues\NotificationQueue;
use PHPQueueManager\PHPQueueManager\Queue\MessageInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use \Symfony\Component\Console\Input\InputInterface;
use \Symfony\Component\Console\Output\OutputInterface;
use \Symfony\Component\Console\Command\Command;

class SMSConsumer extends Command
class NotificationConsumer extends Command
{

protected static $defaultName = "consume:sms";
protected static $defaultName = "consume:notification";

public function execute(InputInterface $input, OutputInterface $output): int
{
Expand All @@ -20,6 +20,7 @@ public function execute(InputInterface $input, OutputInterface $output): int

return true;
});

return Command::SUCCESS;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace App\Commands\Payments;
namespace App\Commands;
use App\Queues\PaymentQueue;
use PHPQueueManager\PHPQueueManager\Queue\MessageInterface;
use Symfony\Component\Console\Command\Command;
Expand Down
22 changes: 22 additions & 0 deletions App/Messages/PaymentMessage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Messages;

use PHPQueueManager\PHPQueueManager\Queue\Message;

class PaymentMessage extends Message
{

public function retryNotification(): bool
{
// It failed and will be retried.
return true;
}

public function deadLetterNotification(): bool
{
// It failed and the message was written as an dead letter.
return true;
}

}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ This application was created to easily create and manage your own job queues. Th
```
composer create-project phpqueuemanager/application
```

## Why should I use it?

- This application provides tremendous flexibility in scaling.
- It can work with different queue mechanisms and different connections at the same time.
- There can be different workers and consumers processing a single queue.
- Advanced error and data management support.

## Starting

Check out the sample template under the "App" directory before you start developing! And then when you are ready to develop your own app you can execute the following command to **destroy everything in the "App" directory**.

```
Expand Down

0 comments on commit 59e51ac

Please sign in to comment.