Class: Google::Cloud::Pubsub::BatchPublisher
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Cloud::Pubsub::BatchPublisher
 
 
- Defined in:
 - lib/google/cloud/pubsub/batch_publisher.rb
 
Overview
Topic Batch Publisher object used to publish multiple messages at once.
Instance Method Summary collapse
- 
  
    
      #publish(data, attributes = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Add a message to the batch to be published to the topic.
 
Instance Method Details
#publish(data, attributes = {}) ⇒ Object
Add a message to the batch to be published to the topic. All messages added to the batch will be published at once. See Topic#publish
      53 54 55  | 
    
      # File 'lib/google/cloud/pubsub/batch_publisher.rb', line 53 def publish data, attributes = {} @messages << (data, attributes) end  |