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
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
I am getting Resource not found (resource=193060) when I try to publish message to Pub/Sub. How to find out which resource is that?
My source code is like:
const express = require('express');
const app = express();
const bodyParser = require("body-parser");
const {PubSub} = require('@google-cloud/pubsub');
// parse application/json
app.use(bodyParser.json({limit: '10mb'}))
// Creates a client; cache this for further use
const pubSubClient = new PubSub();
const topicName = 'projects/codeway-312008/topics/codeway-log';
const data2 = JSON.stringify({
type: 'event',
app_id: 'com.codeway.test',
session_id: 'vIfEMi9kJW',
event_name: 'about',
event_time: 1598196427881,
page: 'settings',
country: 'US',
region: 'New Jersey',
city: 'Newark',
user_id: '9t0lrnYLQr'
});
async function publishMessage() {
// Publishes the message as a string, e.g. "Hello, world!" or JSON.stringify(someObject)
const dataBuffer = Buffer.from(data2);
try {
const messageId = await pubSubClient.topic(topicName).publish(dataBuffer);
console.log(`Message ${messageId} published.`);
} catch (error) {
console.error(`Received error while publishing: ${error}`);
process.exitCode = 1;
}
}
publishMessage();
The text was updated successfully, but these errors were encountered:
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
I am getting Resource not found (resource=193060) when I try to publish message to Pub/Sub. How to find out which resource is that?
My source code is like:
The text was updated successfully, but these errors were encountered: