以下是redis文档的内容,请翻译Blocking list operations on lists or sorted sets have a pop behavior.…
- User
以下是redis文档的内容,请翻译Blocking list operations on lists or sorted sets have a pop behavior. Basically, the element is removed from the list or sorted set in order to be returned to the client. In this scenario you want the items to be consumed in a fair way, depending on the moment clients blocked on a given key arrived. Normally Redis uses the FIFO semantics in this use cases.Blocking list operations on lists or sorted sets have a pop behavior. Basically, the element is removed from the list or sorted set in order to be returned to the client. In this scenario you want the items to be consumed in a fair way, depending on the moment clients blocked on a given key arrived. Normally Redis uses the FIFO semantics in this use cases.
- Assistant
以下是 Redis 文档的内容,请翻译:
列表或有序集合上的阻塞列表操作具有弹出行为。基本上,该元素会从列表或有序集合中移除,然后返回给客户端。在这种情况下,你希望根据客户端在给定键上阻塞的时间点,以公平的方式消费这些元素。通常,Redis 在这些用例中使用先进先出的原则。
- User
但是请注意,对于流来说,这不是问题:当客户端被服务时,流中的条目不会被删除,因此只要一个 XADD 命令向流提供数据,所有等待的客户端都会被服务。
- Assistant
但是请注意,对于流来说,这不是一个问题:当客户端被服务时,流中的条目不会被删除。因此,只要一个 XADD 命令向流提供数据,所有等待的客户端都会得到服务。
- User
翻译However note that with streams this is not a problem: stream entries are not removed from the stream when clients are served, so every client waiting will be served as soon as an XADD command provides data to the stream.
- Assistant
但是请注意,对于流来说,这不是一个问题:当客户端被服务时,流中的条目不会被删除。因此,只要一个 XADD 命令向流中提供数据,所有等待的客户端都会被服务。