0

I have redis stream producer and i have question about the order of records that producer sends to redis.

Redis clients use TCP to execute commands. https://redis.io/topics/protocol#networking-layer

The messages can be delivered out of order in multiple TCP connections. The order of TCP message?

Lets say that my producer executes command to publish record-A to redis, then it executes another command to publish record-B. I expect that record-A is delivered before record-B. But they could be delivered out of order by nature of TCP.

Is there any mechanism to support delivery order? I am using spring-boot-starter-data-redis-reactive (and lettuce client internally) as redis client.

denizg
  • 828
  • 9
  • 18
  • Set the connection pool size to `1`. (Of course it will be a bottleneck in a multi-threaded environment.) – sazzad Apr 27 '21 at 14:46
  • but it effects all applications that uses redis. i want the messages published by the same producer instance to be sequential. it makes more sense to handle this on the client side rather than on the redis server. – denizg Apr 28 '21 at 07:55
  • @sazzad i think you talk about spring.redis.lettuce.pool.max-active property. you are right – denizg Apr 28 '21 at 16:17

0 Answers0