You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varerrTopicStopped=errors.New("pubsub: Stop has been called for this topic")
538
+
// ErrTopicStopped indicates that topic has been stopped and further publishing will fail.
539
+
varErrTopicStopped=errors.New("pubsub: Stop has been called for this topic")
539
540
540
541
// A PublishResult holds the result from a call to Publish.
541
542
//
@@ -548,6 +549,8 @@ var errTopicStopped = errors.New("pubsub: Stop has been called for this topic")
548
549
// }
549
550
typePublishResult= ipubsub.PublishResult
550
551
552
+
varerrTopicOrderingNotEnabled=errors.New("Topic.EnableMessageOrdering=false, but an OrderingKey was set in Message. Please remove the OrderingKey or turn on Topic.EnableMessageOrdering")
553
+
551
554
// Publish publishes msg to the topic asynchronously. Messages are batched and
552
555
// sent according to the topic's PublishSettings. Publish never blocks.
ipubsub.SetPublishResult(r, "", errors.New("Topic.EnableMessageOrdering=false, but an OrderingKey was set in Message. Please remove the OrderingKey or turn on Topic.EnableMessageOrdering"))
// ErrPublishingPaused is a custom error indicating that the publish paused for the specified ordering key.
704
+
typeErrPublishingPausedstruct {
705
+
OrderingKeystring
706
+
}
707
+
708
+
func (eErrPublishingPaused) Error() string {
709
+
returnfmt.Sprintf("pubsub: Publishing for ordering key, %s, paused due to previous error. Call topic.ResumePublish(orderingKey) before resuming publishing", e.OrderingKey)
err=fmt.Errorf("pubsub: Publishing for ordering key, %s, paused due to previous error. Call topic.ResumePublish(orderingKey) before resuming publishing", orderingKey)
732
+
err=ErrPublishingPaused{OrderingKey: orderingKey}
720
733
} else {
721
734
// Apply custom publish retryer on top of user specified retryer and
0 commit comments