Skip to content

Commit

Permalink
fix: Make error message more clear about where ordering must be enabl…
Browse files Browse the repository at this point in the history
…ed when publishing (#293)

* feat: Add flow control support to publisher

* make suggested fixes

* chore: Remove note that ordering keys requires enablements.

* feat: Add support for server-side flow control

* Revert "chore: Remove note that ordering keys requires enablements."

This reverts commit 9c113c3.

* fix: Fix import order

* fix: Make error message more clear about where ordering must be enabled when publishing.
  • Loading branch information
kamalaboulhosn committed Jul 24, 2020
1 parent c8f981b commit f54ed02
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -233,7 +233,9 @@ public ApiFuture<String> publish(PubsubMessage message) {
final String orderingKey = message.getOrderingKey();
Preconditions.checkState(
orderingKey.isEmpty() || enableMessageOrdering,
"Cannot publish a message with an ordering key when message ordering is not enabled.");
"Cannot publish a message with an ordering key when message ordering is not enabled in the "
+ "Publisher client. Please create a Publisher client with "
+ "setEnableMessageOrdering(true) in the builder.");

final OutstandingPublish outstandingPublish =
new OutstandingPublish(messageTransform.apply(message));
Expand Down

0 comments on commit f54ed02

Please sign in to comment.