Misleading error message
hspak opened this issue · 1 comments
hspak commented
Environment details
- OS: Cloud Run Service
- Node.js version: 18.16.0
- npm version: 9.5.1
@google-cloud/pubsub
version: 3.5.0
Steps to reproduce
- Publish messages with orderingKey set.
- Wait for a message to fail.
- All subsequent messages fail, but with a timeout error message (way before the timeout).
I suspect that we are running into this behavior, but the error message does not seem indicative of that:
Lines 861 to 887 in 6c38e7b
I'm sorry I don't have a good, small reproduction case but here's effectively the code being run:
import { PubSub, Topic as PubSubTopic } from '@google-cloud/pubsub';
const pubsub = new PubSub(clientConfig);
const topic = pubsub.topic('TopicName', {
messageOrdering: true,
batching: {
maxMessages: 100,
maxMilliseconds: 250,
},
};
await topic.publishMessage({
data: somePayload,
attributes: someAttrs,
orderingKey: 'myOrderingKey'
});
Here's a timestamp from Cloud Logging showing that the publish failed due to a timeout after 50 seconds only after less than a second of running:
I believe the error message is misleading and incorrect here.