akbarali/nats-sender

Laravel Nats Sender

0.2.1 2024-12-19 12:38 UTC

This package is auto-updated.

Last update: 2024-12-19 12:39:04 UTC


README

TODO

Install

composer require akbarali/nats-sender

Supervisor add Artisan command:

php artisan nats:redis:sender

Supervisor Configuration

Supervisor configuration files are typically stored within your server's /etc/supervisor/conf.d directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored. For example, let's create a nats_sender.conf file that starts and monitors a nats listener process:

[program:nats_sender]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/artisan nats:redis:sender
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
numprocs=1
user=forge
redirect_stderr=true
stdout_logfile=/var/www/supervisor/nats_sender_queue.log

Emotional Damage

I originally wrote this package because RabbitMQ was slow and had a lot of issues with our entire project. I thought NATS would be faster and more reliable. But in the end, it turned out that RabbitMQ is 25% faster.

alt text