class PubsubClient::NullSubscriber
A null object to act as a subscriber when clients are in dev or test
Constants
- NullResult
This adds a subset of the available methods on the Google::Cloud::PubSub::ReceivedMessage, which is what gets yielded by the subscription when configuring the listener. For a list of methods, see the following link: googleapis.dev/ruby/google-cloud-pubsub/latest/Google/Cloud/PubSub/ReceivedMessage.html
Public Instance Methods
listener(*) { |data, res| ... }
click to toggle source
# File lib/pubsub_client/null_subscriber.rb, line 21 def listener(*, &block) res = NullResult.new yield res.data, res end
on_error(&block)
click to toggle source
# File lib/pubsub_client/null_subscriber.rb, line 30 def on_error(&block) # no-op end
subscribe()
click to toggle source
# File lib/pubsub_client/null_subscriber.rb, line 26 def subscribe # no-op end