Upstash Documentation

XACK

Acknowledge stream messages.
2 min read

Use XACK to tell a consumer group that entries have been processed.

Acknowledged entries leave the group's pending entries list, so they are no longer counted as in flight and can no longer be claimed by another consumer. The reply counts the IDs that were actually pending, which means acknowledging twice is harmless and returns 0 the second time.

Acknowledging does not delete the entry from the stream: other groups still see it, and it stays until trimmed. Use XACKDEL when the entry should also be removed.

Syntax#

Arguments#

ArgumentRequiredRepeatableDescription
<key>YesNoRedis key targeted by the command.
<group>YesNoConsumer group name.
<ID>YesYesStream entry ID.

Response#

The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.

ProtocolReply
RESP2Integer
RESP3Integer
Note

Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.

Examples#

TCP examples use the TLS REDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.

Redis CLI
@upstash/redis
upstash_redis
ioredis
node-redis
redis-py
go-redis
jedis
redis-rs