irb(main):004:0> subscriber_client = Google::Cloud::Pubsub::V1::Subscriber.new
NameError: uninitialized constant Google::Cloud::Pubsub::V1::Subscriber
Did you mean? Google::Cloud::Pubsub::V1::SubscriberClient
from (irb):4
from /Users/mackeee/.rbenv/versions/2.4.2/bin/irb:11:in `<main>'
Have you tried the following?
subscriber_client = Google::Cloud::Pubsub::V1::SubscriberClient.new
@blowmage thank you. I can use it.
Are there api document of SubscriberClient ??
I wanna use streaming function.
You can find the SubscriberClient documentation here:
https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/v0.29.0/google/cloud/pubsub/v1/subscriberclient
The Pub/Sub gem has two different APIs, the public API and the low-level API. SubscriberClient is the low-level API. I would suggest looking at Subscriber#listen, which is the public API for streaming subscription messages.
Most helpful comment
You can find the SubscriberClient documentation here:
https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/v0.29.0/google/cloud/pubsub/v1/subscriberclient
The Pub/Sub gem has two different APIs, the public API and the low-level API. SubscriberClient is the low-level API. I would suggest looking at
Subscriber#listen, which is the public API for streaming subscription messages.