diff --git a/topic.go b/topic.go index c08b081..103e2d5 100644 --- a/topic.go +++ b/topic.go @@ -239,7 +239,7 @@ func (t *Topic) Publish(ctx context.Context, data []byte, opts ...PubOpt) error } } - if pub.customKey != nil { + if pub.customKey != nil && !pub.local { key, pid = pub.customKey() if key == nil { return ErrNilSignKey