laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 28 forks source link

Implement Redis Streams for Redis Version 5.0 With Scaffolded Publishers and Consumers Commands Alongside Consumer Groups #2055

Open ghost opened 4 years ago

ghost commented 4 years ago

Description

Implement Redis Streams for Redis Version 5.0 With Scaffolded Publishers and Consumers Commands Alongside Consumer Groups

Example

Implement Redis Streams Wrapper (for Redis V5.0) (XACK XADD XCLAIM XDEL XGROUP XINFO XLEN XPENDING XRANGE XREAD XREADGROUP XREVRANGE XTRIM)

Implement a Scaffold Command for Scaffolding Publishers and Consumers of Streams with Grouping Capabilities (for Redis V5.0)

Shared between publishers and consumers:

php artisan make:stream {stream_name} php artisan remove:stream {stream_name}

For Publishers:

php artisan make:publisher {publisher_name}

For Consumers:

php artisan make:consumer:group {group_name} php artisan remove:consumer:group {group_name} php artisan make:consumer {consumer_name} {[optional_group_name]} php artisan remove:consumer {consumer_name} {[group_name]}

In case the user removed the consumer with the group name then the consumer should be just removed from the group and in case the user did not add a group name, then the consumer should be removed completely as a file.

It should be containing a process with futureTick() or Process implementation to process messages in a non-blocking IO

php artisan start:consumer {consumer_name} {[optional_group_name]} php artisan stop:consumer {consumer_name}

The optional group name should be in case if you want to assign it to a different group name other than the one you created it for.

Implement a Consumer Groupings Wrapper to Group Consumers (for Redis v5.0) php artisan make:consumer:group {group_name}

aibarra11 commented 4 years ago

I would also add the ability to have a wildcard subscription so a single consumer can listen on multiple streams. Had to hack some stuff together with the prwnr streamer package and supervisors. It scales somewhat better with kubernetes - but still really resource heavy.

I think redis 6 is out or will be out soon which also introduces ACLs with username/password