Skip to content

Instantly share code, notes, and snippets.

@ctavan
Last active April 8, 2019 20:30
Show Gist options
  • Save ctavan/2298c2bd965e902d4d8ad2788ffcb0b8 to your computer and use it in GitHub Desktop.
Save ctavan/2298c2bd965e902d4d8ad2788ffcb0b8 to your computer and use it in GitHub Desktop.
node_modules/
yarn.lock
const { PubSub } = require('@google-cloud/pubsub');
const PROJECT_ID = 'your-project-id';
// The following settings will work:
// const COUNT = 19;
// const GRPC_MAX_CONCURRENT_STREAMS = 1;
// const NEW_INSTANCE_FOR_EACH_SUBSCRIPTION = false;
// const MAX_STREAMS_FOR_SUBSCRIPTION_20 = 5;
// The following settings will lead to DEADLINE_EXCEEDED errors:
const COUNT = 20;
const GRPC_MAX_CONCURRENT_STREAMS = 10000;
const NEW_INSTANCE_FOR_EACH_SUBSCRIPTION = false;
const MAX_STREAMS_FOR_SUBSCRIPTION_20 = 5;
// The following settings will work again demonstrating the edge case of exactly 99 concurrent grpc
// streams (maxStreams on the 20th subscription will be reduced from 5 to 4 leading to 5*19 + 4 = 99
// grpc streams):
// const COUNT = 20;
// const GRPC_MAX_CONCURRENT_STREAMS = 10000;
// const NEW_INSTANCE_FOR_EACH_SUBSCRIPTION = false;
// const MAX_STREAMS_FOR_SUBSCRIPTION_20 = 4;
// The following settings will work as well (one new PubSub() instance for each subscription):
// const COUNT = 20;
// const GRPC_MAX_CONCURRENT_STREAMS = 10000;
// const NEW_INSTANCE_FOR_EACH_SUBSCRIPTION = true;
// const MAX_STREAMS_FOR_SUBSCRIPTION_20 = 5;
// Publishing on the same new PubSub() instance doesn't seem to have an effect on whether any of the
// above cases works or not:
const REUSE_PUBLISH_PUBSUB = false;
// ================================================================================================
// No need t oadjust below this line.
const ALREADY_EXISTS = 6; // Error Code
const handles = new Array(COUNT)
.fill(COUNT)
.map((value, index) => ({
topicName: `topic-${index + 1}`,
subscriptionName: `subscription-${index + 1}`,
}));
async function main() {
const pubsubPublish = new PubSub({
projectId: PROJECT_ID,
'grpc.max_concurrent_streams': GRPC_MAX_CONCURRENT_STREAMS,
});
for (handle of handles) {
const { topicName, subscriptionName } = handle;
let topic;
try {
[topic] = await pubsubPublish.createTopic(topicName);
} catch (err) {
if (err.code !== ALREADY_EXISTS) {
throw err;
}
topic = pubsubPublish.topic(topicName);
}
console.log(`Topic ${topicName} created.`);
let subscription;
try {
await topic.createSubscription(subscriptionName);
} catch (err) {
if (err.code !== ALREADY_EXISTS) {
throw err;
}
}
console.log(`Subscription ${subscriptionName} created.`);
await topic.publishJSON({ content: `message to ${topicName}` });
}
const pubsub = REUSE_PUBLISH_PUBSUB ? pubsubPublish : new PubSub({
projectId: PROJECT_ID,
'grpc.max_concurrent_streams': GRPC_MAX_CONCURRENT_STREAMS,
});
// Listen to all subscriptions
for (handle of handles) {
const { topicName, subscriptionName } = handle;
const pubsubSubscribe = NEW_INSTANCE_FOR_EACH_SUBSCRIPTION ? new PubSub({
projectId: PROJECT_ID,
'grpc.max_concurrent_streams': GRPC_MAX_CONCURRENT_STREAMS,
}) : pubsub;
const topic = pubsubSubscribe.topic(topicName);
const options = subscriptionName !== 'subscription-20' ? {} : {
streamingOptions: {
maxStreams: MAX_STREAMS_FOR_SUBSCRIPTION_20,
},
};
const subscription = topic.subscription(subscriptionName, options);
subscription.on('error', (err) => {
console.log(`ERROR FROM SUBSCRIPTION ${subscriptionName}`, err);
});
subscription.on('message', (message) => {
console.log(`Received message on subscription ${subscriptionName}`, message.data.toString());
message.ack();
});
}
}
main();
Topic topic-1 created.
Subscription subscription-1 created.
Topic topic-2 created.
Subscription subscription-2 created.
Topic topic-3 created.
Subscription subscription-3 created.
Topic topic-4 created.
Subscription subscription-4 created.
Topic topic-5 created.
Subscription subscription-5 created.
Topic topic-6 created.
Subscription subscription-6 created.
Topic topic-7 created.
Subscription subscription-7 created.
Topic topic-8 created.
Subscription subscription-8 created.
Topic topic-9 created.
Subscription subscription-9 created.
Topic topic-10 created.
Subscription subscription-10 created.
Topic topic-11 created.
Subscription subscription-11 created.
Topic topic-12 created.
Subscription subscription-12 created.
Topic topic-13 created.
Subscription subscription-13 created.
Topic topic-14 created.
Subscription subscription-14 created.
Topic topic-15 created.
Subscription subscription-15 created.
Topic topic-16 created.
Subscription subscription-16 created.
Topic topic-17 created.
Subscription subscription-17 created.
Topic topic-18 created.
Subscription subscription-18 created.
Topic topic-19 created.
Subscription subscription-19 created.
Topic topic-20 created.
Subscription subscription-20 created.
Received message on subscription subscription-14 {"content":"message to topic-14"}
Received message on subscription subscription-3 {"content":"message to topic-3"}
Received message on subscription subscription-12 {"content":"message to topic-12"}
Received message on subscription subscription-17 {"content":"message to topic-17"}
Received message on subscription subscription-9 {"content":"message to topic-9"}
Received message on subscription subscription-7 {"content":"message to topic-7"}
Received message on subscription subscription-1 {"content":"message to topic-1"}
Received message on subscription subscription-4 {"content":"message to topic-4"}
Received message on subscription subscription-5 {"content":"message to topic-5"}
Received message on subscription subscription-20 {"content":"message to topic-20"}
Received message on subscription subscription-16 {"content":"message to topic-16"}
Received message on subscription subscription-18 {"content":"message to topic-18"}
Received message on subscription subscription-15 {"content":"message to topic-15"}
Received message on subscription subscription-10 {"content":"message to topic-10"}
Received message on subscription subscription-13 {"content":"message to topic-13"}
Received message on subscription subscription-11 {"content":"message to topic-11"}
Received message on subscription subscription-19 {"content":"message to topic-19"}
Received message on subscription subscription-8 {"content":"message to topic-8"}
Received message on subscription subscription-2 {"content":"message to topic-2"}
Received message on subscription subscription-6 {"content":"message to topic-6"}
ERROR FROM SUBSCRIPTION subscription-14 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
at runNextTicks (internal/process/next_tick.js:47:5)
at processImmediate (timers.js:610:7)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUTIysNCGNaNBsNaFxcdAFYBRl7eWV0b10ZBQhFe059ZB8Ja1pZdwFVDht7dWN9bXKpuIzvuZQLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-3 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
at runNextTicks (internal/process/next_tick.js:47:5)
at processImmediate (timers.js:610:7)
ackIds:
[ 'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUVIysNCGNZNBsNaFxcdAFYBRl7eGkkPw8ZAghFe059ZB8Ja11ZdgFVDh9zfmR3a3Lht4W1tJQLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-12 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
at runNextTicks (internal/process/next_tick.js:47:5)
at processImmediate (timers.js:610:7)
ackIds:
[ 'Pn49MEVBXkASTDYFRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUWIysNCGNZNBsNaFxcdAFYBRl7eWJ8OFkZAghFe059ZB8JalVdfA9ZDh5wemB8a3Lv7cvzuZQLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-17 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUXIysNCGNbNBsNaFxcdAFYBRl7eWUhaFMZBQhFe059ZB8JalVdfAJQCRF0eGR8bHLkt4W1tJQLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-9 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUQIysNCGNcNBsNaFxcdAFYBRl7eWMhbwkZBQhFe059ZB8Ja11ZdgFVDh9zfWhzbHKWk4i83a8LZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-7 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUSIysNCGNeNBsNaFxcdAFYBRl7eWNwbFMZBQhFe059ZB8Ja1pZdwFVDhpyfGJxYnKftanko68LZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-1 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUXIysNCGNbNBsNaFxcdAFYBRl7eGlxal0ZAghFe059ZB8JalVdfAJZDBBxfmN1bHLL3pyHtpQLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-4 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUXIysNCGNbNBsNaFxcdAFYBRl7eWB8Y14ZBQhFe059ZB8JalVdfA9ZDh5xfWB9bHL0vqSh0qYLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-5 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUXIysNCGNbNBsNaFxcdAFYBRl7eWAhOFgZBQhFe059ZB8JalVdfANWCR1zeWN8Y3K9oMDV3q8LZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-20 { Error: Failed to "acknowledge" for 3 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
at runNextTicks (internal/process/next_tick.js:47:5)
at processImmediate (timers.js:610:7)
ackIds:
[ 'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEURIysNCGNdNBsNaFxcdAFYBRl6KGYkOFMZAAhFe059ZB8JalhYfAFZDBB3e2l9Y3Ly7cvzuZQLZh09WBJLLA',
'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEURIysNCGNdNBsNaFxcdAFYBRl6KGYkOFMZAwhFe059ZB8JalVedQdTCx13eGhzY3Ly7cvzuZQLZh09WBJLLA',
'Pn49MUVBXkASTDYERElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEURIysNCGNdNBsNaFxcdAFYBRl6KGYkOFMZAQhFe059ZB8JaVtZfQ9QDxB3dGhyY3Ly7cvzuZQLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-16 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MEVBXkASTDYFRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUWIysNCGNdNBsNaFxcdAFYBRl7eWV8aA4ZBQhFe059ZB8JalVdfAJZDxhwemR0bnLNiurv3a8LZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-18 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUWIysNCGNcNBsNaFxcdAFYBRl7eDJ1P1oZAghFe059ZB8JalpUdAdRChh6dGZxa3Lx57Kxv7gLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-15 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
at runNextTicks (internal/process/next_tick.js:47:5)
at processImmediate (timers.js:610:7)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUWIysNCGNbNBsNaFxcdAFYBRl7eWVwaFsZBQhFe059ZB8Jal5ecAZVDxlxfGVza3K-1LqYmKELZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-10 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUWIysNCGNfNBsNaFxcdAFYBRl7eWJ0bwsZBQhFe059ZB8JalpUdAdRChh7f2B9aXLghYPXzqYLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-13 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MEVBXkASTDYFRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEURIysNCGNeNBsNaFxcdAFYBRl7eWIhbV8ZBQhFe059ZB8JalVedQBRBR5yeWF0anLdl-uz3K8LZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-11 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUSIysNCGNaNBsNaFxcdAFYBRl7eWJwYloZBQhFe059ZB8JalpUdA9QDRlwf2h2b3KqxL-DzqYLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-19 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MEVBXkASTDYFRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUXIysNCGNeNBsNaFxcdAFYBRl7eWRxOFoZAghFe059ZB8Ja1pZdwFVDht7e2R3anL9vqSh0qYLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-8 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49MEVBXkASTDYFRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUXIysNCGNfNBsNaFxcdAFYBRl7eWN8YloZAghFe059ZB8JalVdfAJZDBBxfWJya3Kh5pGQ2ogLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-2 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUSIysNCGNfNBsNaFxcdAFYBRl7eWB0a10ZBQhFe059ZB8JalVedQFQBR90eWlyaHKpp8KKvJ0LZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
ERROR FROM SUBSCRIPTION subscription-6 { Error: Failed to "acknowledge" for 1 message(s). Reason: 4 DEADLINE_EXCEEDED: Deadline Exceeded
at AckQueue.<anonymous> (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:162:23)
at Generator.throw (<anonymous>)
at rejected (/node_modules/@google-cloud/pubsub/build/src/message-queues.js:20:65)
ackIds:
[ 'Pn49N0VBXkASTDYCRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUSIysNCGNfNBsNaFxcdAFYBRl7eWN0O18ZBQhFe059ZB8JalVedQBRBR5ye2l2bXKw-YiMt5QLZh09WBJLLA' ],
code: 4,
metadata: Metadata { _internal_repr: {} } }
Topic topic-1 created.
Subscription subscription-1 created.
Topic topic-2 created.
Subscription subscription-2 created.
Topic topic-3 created.
Subscription subscription-3 created.
Topic topic-4 created.
Subscription subscription-4 created.
Topic topic-5 created.
Subscription subscription-5 created.
Topic topic-6 created.
Subscription subscription-6 created.
Topic topic-7 created.
Subscription subscription-7 created.
Topic topic-8 created.
Subscription subscription-8 created.
Topic topic-9 created.
Subscription subscription-9 created.
Topic topic-10 created.
Subscription subscription-10 created.
Topic topic-11 created.
Subscription subscription-11 created.
Topic topic-12 created.
Subscription subscription-12 created.
Topic topic-13 created.
Subscription subscription-13 created.
Topic topic-14 created.
Subscription subscription-14 created.
Topic topic-15 created.
Subscription subscription-15 created.
Topic topic-16 created.
Subscription subscription-16 created.
Topic topic-17 created.
Subscription subscription-17 created.
Topic topic-18 created.
Subscription subscription-18 created.
Topic topic-19 created.
Subscription subscription-19 created.
Received message on subscription subscription-18 {"content":"message to topic-18"}
Received message on subscription subscription-15 {"content":"message to topic-15"}
Received message on subscription subscription-10 {"content":"message to topic-10"}
Received message on subscription subscription-13 {"content":"message to topic-13"}
Received message on subscription subscription-19 {"content":"message to topic-19"}
Received message on subscription subscription-8 {"content":"message to topic-8"}
Received message on subscription subscription-7 {"content":"message to topic-7"}
Received message on subscription subscription-5 {"content":"message to topic-5"}
Received message on subscription subscription-1 {"content":"message to topic-1"}
Received message on subscription subscription-4 {"content":"message to topic-4"}
Received message on subscription subscription-16 {"content":"message to topic-16"}
Received message on subscription subscription-12 {"content":"message to topic-12"}
Received message on subscription subscription-17 {"content":"message to topic-17"}
Received message on subscription subscription-3 {"content":"message to topic-3"}
Received message on subscription subscription-9 {"content":"message to topic-9"}
Received message on subscription subscription-14 {"content":"message to topic-14"}
Received message on subscription subscription-11 {"content":"message to topic-11"}
Received message on subscription subscription-2 {"content":"message to topic-2"}
Received message on subscription subscription-6 {"content":"message to topic-6"}
{
"dependencies": {
"@google-cloud/pubsub": "^0.28.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment