Skip to main content
Overview
Redis
Vector
QStash
Workflow
Search
Box
Realtime
Developer API
Search
⌘K
Ask AI
⌘I
Discord
Blog
Twitter
Console
Redis
/
/
SDKs
/
Typescript
/
Commands
/
Stream
XLEN
Returns the number of entries inside a stream.
1 min read
Copy as Markdown
Arguments
#
key
string
required
#
The key of the stream.
Response
#
XINFO
XPENDING
Get stream length
const
result
=
await
redis.
xlen
(
"mystream"
);