go-redis/redis · error
redis: unsupported pubsub message: %#v
Error message
redis: unsupported pubsub message: %#v
What it means
Error "redis: unsupported pubsub message: %#v" thrown in go-redis/redis.
Source
Thrown at pubsub.go:483
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, err
}
err = cn.WithReader(ctx, timeout, func(rd *proto.Reader) error {View on GitHub (pinned to 36d97525cd)
Solutions
- Inspect the message value in the error; extend handling for that shape
- Use RESP3 push handlers for newer notification styles
When it happens
Trigger: Thrown at pubsub.go:483 when the library encounters an invalid state.
Common situations: Default-case unknown pubsub frames with logging rather than failure where possible.
AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06).
Data as JSON: /data/errors/ec3fbb5715801e85.json.
Report an issue: GitHub.