Class: Gcloud::Pubsub::Topic::Batch

Inherits:
Object
  • Object
show all
Defined in:
lib/gcloud/pubsub/topic.rb

Overview

Batch object used to publish multiple messages at once.

Instance Method Summary collapse

Instance Method Details

#publish(data, attributes = {}) ⇒ Object

Add multiple messages to the topic. All messages added will be published at once. See Gcloud::Pubsub::Topic#publish


530
531
532
# File 'lib/gcloud/pubsub/topic.rb', line 530

def publish data, attributes = {}
  @messages << [data, attributes]
end