antirez / antirez/disque

Queue tagging

Offen
#130 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C
Sterne
8.1k
Forks
532
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hey guys

I'm looking to move from SoftLayers message queue to Disque in the future once a stable release is out.
However one of the features that I've found incredibly useful from SL's messaging queue is the ability to tag queues.

For example we have several workflows for when a new user registers (e.g. welcome email, schedule on-boarding drip feed etc). Instead of having to persist somewhere the name of each queue and its role we can simply collect up all the queues with the tag `user_register` and submit the same message to each.

``` php
$queues = $messaging->queues(array('user_register'));
foreach ($queues as $q)
{
$q->message()
->addField('userId', $user->getId())
->create();
}
```

This means if we add a new worker that wants to ingest messages relating to that tag (e.g. a feedback email) we just need to add that tag to the queue and then they will receive those messages.

As I understand this would require making queues somewhat persistent as currently they only exist while they contain messages.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.