Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to subcribe pubsub topic but not getting anything #679

Closed
AP25 opened this issue Jun 19, 2015 · 8 comments
Closed

Trying to subcribe pubsub topic but not getting anything #679

AP25 opened this issue Jun 19, 2015 · 8 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. type: question Request for information or clarification. Not an issue.

Comments

@AP25
Copy link

AP25 commented Jun 19, 2015

Hi,

I am trying to subscribe created topic on pubsub for that i am using

var gcloud = require('gcloud');
var pubsub1 = gcloud.pubsub({
    projectId: 'ProjectID',
    keyFilename: KeyFile(Buffer format)
});
pubsub1.createTopic('topicName', function(err, topic) {
});
var _topicCreated = pubsub1.topic('topicName')
 _topicCreated.subscribe('newSubscription', function(err, subscription) {
 }); 

But using this i am not getting callback of subscription. Is anything missing in this request?

Thanks in advance!!!

@jgeewax
Copy link
Contributor

jgeewax commented Jun 19, 2015

What exactly is going on in keyFilename: KeyFile(Buffer format) ? keyFilename should be a path to a .json file you get via the Cloud Console (see http://googlecloudplatform.github.io/gcloud-node/#/authorization for more on that).

Can you also clarify what you mean by "not getting callback of subscription"? You mean the callback is not being executed? Did you try adding console.log(err) inside each of the callbacks to see what's happening?

@jgeewax jgeewax added type: question Request for information or clarification. Not an issue. api: pubsub Issues related to the Pub/Sub API. labels Jun 19, 2015
@jgeewax
Copy link
Contributor

jgeewax commented Jun 19, 2015

Also -- this might be better asked over on StackOverflow unless it looks like a bug with gcloud.pubsub.

@AP25
Copy link
Author

AP25 commented Jun 19, 2015

Hi jgeewax,

Yes i am using keyFilename as .json file of cloud console.I am not getting callback of subscription means i added console.log(err) and console.log(subscription).But i didn't get any error or subscription log.
Same thing happened while creating topic.I didn't get error log also.
So is that topic is created? and how can i subscribe to that topic ?

@jgeewax
Copy link
Contributor

jgeewax commented Jun 19, 2015

You're saying that the callback isn't getting executed at all?

As in, running the following prints out nothing?

var gcloud = require('gcloud');
var pubsub = gcloud.pubsub({
    projectId: 'purple-spaceship-123', // or whatever your project ID is.
    keyFilename: '~/keyfile.json' // or the path to your keyfile
});

pubsub.createTopic('topicName', function(err, topic) {
  console.log('Response was', err, topic);
});

@AP25
Copy link
Author

AP25 commented Jun 20, 2015

Hi jgeewax ,

Yes.Callback isn't get executed at all.Yes above code prints nothing.

@jgeewax
Copy link
Contributor

jgeewax commented Jun 20, 2015 via email

@AP25
Copy link
Author

AP25 commented Jun 20, 2015

Hi jgeewax,

Thanks i have created topic successfully. I want to create watch on that pub/sub topic.For that i am using rest request as

request_Req.post({

url:'https://www.googleapis.com/gmail/v1/users/me/watch',
headers:{
   'content-type': 'application/json',
   'Authorization': 'Bearer '+ access_token,
},
scope : [
    'https://mail.google.com/'
],

'body': JSON.stringify({
    'topicName' : "/projects/ProjectId/topics/TopicId",
    'labelIds' : ["INBOX"] 
});
}),function(error, resp, body){
});

But after executing this code i am getting error as sending test message to Cloud
PubSub/projects/ProjectID/topics/TopicId : Resource not found(resource=TopicId)

@jgeewax
Copy link
Contributor

jgeewax commented Jun 21, 2015

Hi @AP25 ,

Did you figure out what the problem was ? (So that others reading this could solve it themselves?)

It looks like your next question isn't really about this library, so you might want to take it over to Stack Overflow to see if someone can help out.

I'm going to resolve this issue (but still would love to hear how you fixed the first issue!), feel free to re-open if I misunderstood and this is either a bug or a question about gcloud-node.

@jgeewax jgeewax closed this as completed Jun 21, 2015
sofisl pushed a commit that referenced this issue Oct 11, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mathjs](https://mathjs.org) ([source](https://togithub.com/josdejong/mathjs)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/mathjs/10.6.4/11.0.1) | [![age](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/compatibility-slim/10.6.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/confidence-slim/10.6.4)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>josdejong/mathjs</summary>

### [`v11.0.1`](https://togithub.com/josdejong/mathjs/blob/HEAD/HISTORY.md#&#8203;2022-07-25-version-1101)

[Compare Source](https://togithub.com/josdejong/mathjs/compare/v11.0.0...v11.0.1)

-   Fix [#&#8203;2632](https://togithub.com/josdejong/mathjs/issues/2632): TypeScript issue of `simplifyConstant` and `simplifyCore`
    not having a return type defined.

### [`v11.0.0`](https://togithub.com/josdejong/mathjs/blob/HEAD/HISTORY.md#&#8203;2022-07-23-version-1100)

[Compare Source](https://togithub.com/josdejong/mathjs/compare/v10.6.4...v11.0.0)

!!! BE CAREFUL: BREAKING CHANGES !!!

Breaking changes:

-   Dropped official support for IE11.
-   Upgraded to `typed-function@3`, see [josdejong/typed-function/HISTORY.md](https://togithub.com/josdejong/typed-function/blob/develop/HISTORY.md#&#8203;2022-05-12-version-300). Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney). Most importantly:
    -   Conversions now have preference over `any`.
    -   The `this` variable is no longer bound to the typed function itself.
    -   The properties `typed.types`, `typed.conversions`, and `typed.ignore`
        have been removed.
    -   There are new static functions available like `typed.referTo`,
        `typed.referToSelf`, `typed.addTypes`, `typed.addConversions`.
-   Implement amended "Rule 2" for implicit multiplication ([#&#8203;2370](https://togithub.com/josdejong/mathjs/issues/2370), [#&#8203;2460](https://togithub.com/josdejong/mathjs/issues/2460)):
    when having a division followed by an implicit multiplication, the division
    gets higher precedence over the implicit multiplication when (a) the
    numerator is a constant with optionally a prefix operator (`-`, `+`, `~`),
    and (b) the denominator is a constant. For example: formerly `-1 / 2 x` was
    interpreted as `-1 / (2 * x)` and now it is interpreted as `(-1 / 2) * x`.
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Drop elementwise matrix support for trigonometric functions, exp, log, gamma,
    square, sqrt, cube, and cbrt to prevent confusion with standard matrix
    functions ([#&#8203;2440](https://togithub.com/josdejong/mathjs/issues/2440), [#&#8203;2465](https://togithub.com/josdejong/mathjs/issues/2465)). Instead, use `math.map(matrix, fn)`.
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Simplify: convert equivalent function calls into operators, for example,
    `add(2, x)` will now be simplified into `2 + x` ([#&#8203;2415](https://togithub.com/josdejong/mathjs/issues/2415), [#&#8203;2466](https://togithub.com/josdejong/mathjs/issues/2466)).
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Removed the automatic conversion from `number` to `string` ([#&#8203;2482](https://togithub.com/josdejong/mathjs/issues/2482)).
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Fix [#&#8203;2412](https://togithub.com/josdejong/mathjs/issues/2412): let function `diff` return an empty matrix when the input contains
    only one element ([#&#8203;2422](https://togithub.com/josdejong/mathjs/issues/2422)).
-   Internal refactoring in the `simplifyCore` logic ([#&#8203;2490](https://togithub.com/josdejong/mathjs/issues/2490), [#&#8203;2484](https://togithub.com/josdejong/mathjs/issues/2484), [#&#8203;2459](https://togithub.com/josdejong/mathjs/issues/2459)).
    The function `simplifyCore` will no longer (partially) merge constants, that
    behavior has been moved to `simplifyConstant`. The combination of
    `simplifyConstant` and `simplifyCore` is still close to the old behavior
    of `simplifyCore`, but there are some differences. To reproduce the same
    behavior as the old `simplifyCore`, you can use
    `math.simplify(expr, [math.simplifyCore, math.simplifyConstant])`.
    Thanks to the refactoring, `simplify` is more thorough in reducing constants.
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Disable support for splitting rest parameters in chained calculations
    ([#&#8203;2485](https://togithub.com/josdejong/mathjs/issues/2485), [#&#8203;2474](https://togithub.com/josdejong/mathjs/issues/2474)). For example: `math.chain(3).max(4, 2).done()` will now throw
    an error rather than return `4`, because the rest parameter of
    `math.max(...number)` has been split between the contents of the chain and
    the arguments to the max call. Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Function `typeOf` now returns `function` (lowercase) for a function instead
    of `Function` ([#&#8203;2560](https://togithub.com/josdejong/mathjs/issues/2560)). Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).

Non-breaking changes:

-   Fix [#&#8203;2600](https://togithub.com/josdejong/mathjs/issues/2600): improve the TypeScript definitions of `simplify`.
    Thanks [@&#8203;laureen-m](https://togithub.com/laureen-m) and [@&#8203;mattvague](https://togithub.com/mattvague).
-   Fix [#&#8203;2607](https://togithub.com/josdejong/mathjs/issues/2607): improve type definition of `createUnit`. Thanks [@&#8203;egziko](https://togithub.com/egziko).
-   Fix [#&#8203;2608](https://togithub.com/josdejong/mathjs/issues/2608): clarify the docs on the need to configure a smaller `epsilon`
    when using BigNumbers.
-   Fix [#&#8203;2613](https://togithub.com/josdejong/mathjs/issues/2613): describe matrix methods `get` and `set` in the docs.
-   Fix link to `math.rationalize` in the docs ([#&#8203;2616](https://togithub.com/josdejong/mathjs/issues/2616)). Thanks [@&#8203;nukisman](https://togithub.com/nukisman).
-   Fix [#&#8203;2621](https://togithub.com/josdejong/mathjs/issues/2621): add TypeScript definitions for `count` ([#&#8203;2622](https://togithub.com/josdejong/mathjs/issues/2622)). Thanks [@&#8203;Hansuku](https://togithub.com/Hansuku).
-   Improved TypeScript definitions of `multiply` ([#&#8203;2623](https://togithub.com/josdejong/mathjs/issues/2623)). Thanks [@&#8203;Windrill](https://togithub.com/Windrill).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjIuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEyNy4wIn0=-->
sofisl pushed a commit that referenced this issue Oct 13, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mathjs](https://mathjs.org) ([source](https://togithub.com/josdejong/mathjs)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/mathjs/10.6.4/11.0.1) | [![age](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/compatibility-slim/10.6.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/mathjs/11.0.1/confidence-slim/10.6.4)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>josdejong/mathjs</summary>

### [`v11.0.1`](https://togithub.com/josdejong/mathjs/blob/HEAD/HISTORY.md#&#8203;2022-07-25-version-1101)

[Compare Source](https://togithub.com/josdejong/mathjs/compare/v11.0.0...v11.0.1)

-   Fix [#&#8203;2632](https://togithub.com/josdejong/mathjs/issues/2632): TypeScript issue of `simplifyConstant` and `simplifyCore`
    not having a return type defined.

### [`v11.0.0`](https://togithub.com/josdejong/mathjs/blob/HEAD/HISTORY.md#&#8203;2022-07-23-version-1100)

[Compare Source](https://togithub.com/josdejong/mathjs/compare/v10.6.4...v11.0.0)

!!! BE CAREFUL: BREAKING CHANGES !!!

Breaking changes:

-   Dropped official support for IE11.
-   Upgraded to `typed-function@3`, see [josdejong/typed-function/HISTORY.md](https://togithub.com/josdejong/typed-function/blob/develop/HISTORY.md#&#8203;2022-05-12-version-300). Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney). Most importantly:
    -   Conversions now have preference over `any`.
    -   The `this` variable is no longer bound to the typed function itself.
    -   The properties `typed.types`, `typed.conversions`, and `typed.ignore`
        have been removed.
    -   There are new static functions available like `typed.referTo`,
        `typed.referToSelf`, `typed.addTypes`, `typed.addConversions`.
-   Implement amended "Rule 2" for implicit multiplication ([#&#8203;2370](https://togithub.com/josdejong/mathjs/issues/2370), [#&#8203;2460](https://togithub.com/josdejong/mathjs/issues/2460)):
    when having a division followed by an implicit multiplication, the division
    gets higher precedence over the implicit multiplication when (a) the
    numerator is a constant with optionally a prefix operator (`-`, `+`, `~`),
    and (b) the denominator is a constant. For example: formerly `-1 / 2 x` was
    interpreted as `-1 / (2 * x)` and now it is interpreted as `(-1 / 2) * x`.
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Drop elementwise matrix support for trigonometric functions, exp, log, gamma,
    square, sqrt, cube, and cbrt to prevent confusion with standard matrix
    functions ([#&#8203;2440](https://togithub.com/josdejong/mathjs/issues/2440), [#&#8203;2465](https://togithub.com/josdejong/mathjs/issues/2465)). Instead, use `math.map(matrix, fn)`.
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Simplify: convert equivalent function calls into operators, for example,
    `add(2, x)` will now be simplified into `2 + x` ([#&#8203;2415](https://togithub.com/josdejong/mathjs/issues/2415), [#&#8203;2466](https://togithub.com/josdejong/mathjs/issues/2466)).
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Removed the automatic conversion from `number` to `string` ([#&#8203;2482](https://togithub.com/josdejong/mathjs/issues/2482)).
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Fix [#&#8203;2412](https://togithub.com/josdejong/mathjs/issues/2412): let function `diff` return an empty matrix when the input contains
    only one element ([#&#8203;2422](https://togithub.com/josdejong/mathjs/issues/2422)).
-   Internal refactoring in the `simplifyCore` logic ([#&#8203;2490](https://togithub.com/josdejong/mathjs/issues/2490), [#&#8203;2484](https://togithub.com/josdejong/mathjs/issues/2484), [#&#8203;2459](https://togithub.com/josdejong/mathjs/issues/2459)).
    The function `simplifyCore` will no longer (partially) merge constants, that
    behavior has been moved to `simplifyConstant`. The combination of
    `simplifyConstant` and `simplifyCore` is still close to the old behavior
    of `simplifyCore`, but there are some differences. To reproduce the same
    behavior as the old `simplifyCore`, you can use
    `math.simplify(expr, [math.simplifyCore, math.simplifyConstant])`.
    Thanks to the refactoring, `simplify` is more thorough in reducing constants.
    Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Disable support for splitting rest parameters in chained calculations
    ([#&#8203;2485](https://togithub.com/josdejong/mathjs/issues/2485), [#&#8203;2474](https://togithub.com/josdejong/mathjs/issues/2474)). For example: `math.chain(3).max(4, 2).done()` will now throw
    an error rather than return `4`, because the rest parameter of
    `math.max(...number)` has been split between the contents of the chain and
    the arguments to the max call. Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).
-   Function `typeOf` now returns `function` (lowercase) for a function instead
    of `Function` ([#&#8203;2560](https://togithub.com/josdejong/mathjs/issues/2560)). Thanks [@&#8203;gwhitney](https://togithub.com/gwhitney).

Non-breaking changes:

-   Fix [#&#8203;2600](https://togithub.com/josdejong/mathjs/issues/2600): improve the TypeScript definitions of `simplify`.
    Thanks [@&#8203;laureen-m](https://togithub.com/laureen-m) and [@&#8203;mattvague](https://togithub.com/mattvague).
-   Fix [#&#8203;2607](https://togithub.com/josdejong/mathjs/issues/2607): improve type definition of `createUnit`. Thanks [@&#8203;egziko](https://togithub.com/egziko).
-   Fix [#&#8203;2608](https://togithub.com/josdejong/mathjs/issues/2608): clarify the docs on the need to configure a smaller `epsilon`
    when using BigNumbers.
-   Fix [#&#8203;2613](https://togithub.com/josdejong/mathjs/issues/2613): describe matrix methods `get` and `set` in the docs.
-   Fix link to `math.rationalize` in the docs ([#&#8203;2616](https://togithub.com/josdejong/mathjs/issues/2616)). Thanks [@&#8203;nukisman](https://togithub.com/nukisman).
-   Fix [#&#8203;2621](https://togithub.com/josdejong/mathjs/issues/2621): add TypeScript definitions for `count` ([#&#8203;2622](https://togithub.com/josdejong/mathjs/issues/2622)). Thanks [@&#8203;Hansuku](https://togithub.com/Hansuku).
-   Improved TypeScript definitions of `multiply` ([#&#8203;2623](https://togithub.com/josdejong/mathjs/issues/2623)). Thanks [@&#8203;Windrill](https://togithub.com/Windrill).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-language).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjIuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEyNy4wIn0=-->
sofisl pushed a commit that referenced this issue Nov 11, 2022
sofisl pushed a commit that referenced this issue Jan 24, 2023
autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.
sofisl pushed a commit that referenced this issue Jan 25, 2023
autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants