go-redis/redis · error
redis: unsupported pubsub message: %q
Error message
redis: unsupported pubsub message: %q
What it means
Error "redis: unsupported pubsub message: %q" thrown in go-redis/redis.
Source
Thrown at pubsub.go:480
default:
return nil, fmt.Errorf("redis: unsupported pubsub message payload: %T", payload)
}
case "pmessage":
channel := reply[2].(string)
msg := &Message{
Pattern: reply[1].(string),
Channel: channel,
Payload: reply[3].(string),
}
// Record PubSub message received (pattern message, not sharded)
otel.RecordPubSubMessage(ctx, cn, "received", channel, false)
return msg, nil
case "pong":
return &Pong{
Payload: reply[1].(string),
}, nil
default:
return nil, fmt.Errorf("redis: unsupported pubsub message: %q", kind)
}
default:
return nil, fmt.Errorf("redis: unsupported pubsub message: %#v", reply)
}
}
// ReceiveTimeout acts like Receive but returns an error if message
// is not received in time. This is low-level API and in most cases
// Channel should be used instead.
func (c *PubSub) ReceiveTimeout(ctx context.Context, timeout time.Duration) (interface{}, error) {
if c.cmd == nil {
c.cmd = NewCmd(ctx)
}
// Don't hold the lock to allow subscriptions and pings.
cn, err := c.connWithLock(ctx)
if err != nil {
return nil, errView on GitHub (pinned to 36d97525cd)
Solutions
- Check the quoted message kind; the server sent an unsupported pubsub frame type
- Upgrade go-redis if the server uses newer pubsub message kinds
When it happens
Trigger: Thrown at pubsub.go:480 when the library encounters an invalid state.
Common situations: Keep go-redis current with the server version to support all message kinds.
AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06).
Data as JSON: /data/errors/a3334eadf5ec3666.json.
Report an issue: GitHub.