Questions tagged [redis-streams]

Redis Streams is a data structure released as part of Redis 5.0. Conceptually inspired by Apache™ Kafka, they are a log-like structure designed for storing append-only semi-structured data. Use this tag for questions related to the Redis Stream data type.

Redis Streams is a data structure released as part of Redis 5.0. Conceptually inspired by Apache™ Kafka, they are a log-like structure designed for storing append-only semi-structured data.

88 questions
0
votes
0 answers

What is the proper way to store a complex object in Redis stream?

Let's image that our data looks like this: { id: 0, user: { name: "John Doe" }, post: { id: 0, content: "Blah blah", replies: [ { id: 0, content: "Blah blah" } ] } } What is the best way to…
0
votes
0 answers

Using Django Channels with Redis Streams

I have written a Django application to receive updates of long running tasks. I am using Redis as a channel layer for web-sockets and also making use of Redis Streams to store the updates of the tasks that are currently running. I have spawned a…
0
votes
1 answer

How to replicate tail -f behavior with redis-py XREAD

I am using Redis streams and basically have a stream that will append an END sentinel message when it's done. Until then, I basically want to mimic tail -f which is when I begin a read I want to see all previous logs until the current time and then…
0
votes
0 answers

design patterns for async stripe webhook fulfillment

My current setup: I have a Stripe webhook that listens for checkout success events. After payment success, my koa.js server will fire off a async task that does more processing and immediately returns status 200 to Stripe. Stripe would redirect the…
varimax
  • 111
  • 1
  • 13
0
votes
0 answers

I want a similar data Structure as a Redis list which also have maximum limit on length as like Redis Stream

I want a similar data Structure as a Redis list which also have maximum limit on length as like Redis Stream. My usecase is to consume less space less operation(I can use stream but it is not good for me because of data I am handling and Ltrim on…
0
votes
1 answer

Redis streams how to route messages

Is there a concept like kafka routing key in redis streams? We have a number of microservice instances (let say 10) and we intend to create a consumer group, each consumer is one instance. We want messages of instance n will be read/retrieved only…
SoT
  • 898
  • 1
  • 15
  • 36
0
votes
1 answer

Are StackExchange.Redis fire-and-forget calls guaranteed to be delivered in order?

If I make multiple StackExchange.Redis calls from a single thread using fire-and-forget, are they guaranteed to be delivered in order? Use case: I am adding an item to a Redis stream and then using pub/sub to trigger another service to process that…
Mike
  • 7,500
  • 8
  • 44
  • 62
0
votes
1 answer

How to remove redis stream pending entries from a consumer?

When a consumer from a group xread a stream entry, it will go to the consumer pending entry and as far as I know, it could be removed from the PEL either the consumer do XACK or it is XCLAIM/XAUTOCLAIM by another consumer. Though my question, if the…
dibii
  • 7
  • 5
0
votes
1 answer

Redis streams - free struck messages in a consumer group without claiming

Lets say, there are messages in a Redis consumer group that has not been processed for N seconds. I am trying to understand if its possible to free them and put them back for other members of the consumer group to see it. I don't want to…
askids
  • 1,406
  • 1
  • 15
  • 32
0
votes
0 answers

Addressing race condition from XREAD on multiple Redis Streams

I'm using Redis Streams (via node's ioredis) on a project, and an automated test has revealed a potential race condition that I'm trying to work through a resolution for. The problem boiled down is this: I have an event loop which continually makes…
thorsday
  • 346
  • 1
  • 5
0
votes
0 answers

Spring boot web socket message broker shutdown before redis stream

I have a Spring Boot application, implementing Websocket as well as Redis stream. The flow is, Subscriber (who subscribes Redis stream) upon receiving message will then send that information into Websocket (using STOMP protocol and AmazonMQ -…
0
votes
0 answers

Redis StreamMessageListenerContainer dont reconnect on redis server restart

I have implemented StreamMessageListenerContainer to consume and process message from Redis Stream. I am using Lettuce Connection factory. While my application is deployed, I restart Redis server and my StreamMessageListenerContainer stops consuming…
VedantK
  • 9,728
  • 7
  • 66
  • 71
0
votes
0 answers

How do we run multiple services of a single FastAPI application from single script/command

I am building APIs for a Microservice application using FastAPI. I built 2 microservices: ServiceA at localhost:8000 and ServiceB at localhost:8001. They are communicating with each other via RedisStreams. Here is how the directory structure looks…
0
votes
1 answer

Make two microservices hosted on different machine communicate with each other using Redis Pub/Sub

I have two diiferent microserivice and one API Gateway. All hosted on different machine. I want both microservice communicate with each other using Redis Pub/Sub. I am able to make them talk to each other while all the microservice are hosted on…
Tushar Sureka
  • 111
  • 1
  • 1
  • 9
0
votes
1 answer

Publish message from Redis / redis stream to a micro service

I have a scenario like I would be storing details on the redis-database and this would publish messages to external API's. Question: Is that feasible to publish message from Redis to outside world? - All pub/sub I have seen are within redis-cli.