Menu

Using Redis Streams Between Laravel Applications
📰

Using Redis Streams Between Laravel Applications

DEV Community: redis·Brian Hamner·4 days ago
#6HFCKbUp
#devtoredis#devto#dev#streams#messages
Long article (714 words) — no AI summary yet.
Reading 0:00
15s threshold

A while back I started using Redis Streams to handle communication between several Laravel applications. I liked the idea of an application being able to publish an event without needing to know which other applications were interested in it.

One of the reasons I went with streams instead of Redis Pub/Sub was that I didn't want to lose events if one of the applications happened to be down. With streams, each application can have its own consumer group and pick up where it left off, provided the messages are still in the stream.

The other thing I liked was being able to run multiple workers within each group.

Working directly with Redis wasn't particularly difficult, but there was a fair amount of code involved in managing the consumers.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.