redis/go-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 redis/go-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 c5cad058c7)
When it happens
Trigger: Thrown at pubsub.go:480 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of redis/go-redis@c5cad058c7 (2026-09-01).
Data as JSON: /api/errors/dc10e760abc24d72.
Report an issue: GitHub.