Skip to content

Instantly share code, notes, and snippets.

@Oshiumi
Created Dec 14, 2018
Embed
What would you like to do?
require 'google/cloud/pubsub'
pubsub = Google::Cloud::Pubsub.new(project_id: ENV['GCP_PROJECT_ID'])
topic = pubsub.topic ENV['PUBSUB_TOPIC']
# Publish 100,000 messages
100000.times { |i| topic.publish "test#{i}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment