lib/fluent/plugin/out_gcloud_pubsub.rb in fluent-plugin-gcloud-pubsub-custom-1.3.2 vs lib/fluent/plugin/out_gcloud_pubsub.rb in fluent-plugin-gcloud-pubsub-custom-1.4.0

- old
+ new

@@ -17,10 +17,12 @@ config_param :project, :string, :default => nil desc 'Set your credential file path.' config_param :key, :string, :default => nil desc 'Set topic name to publish.' config_param :topic, :string + desc "Set your dest GCP project if publishing cross project" + config_param :dest_project, :string, :default => nil desc "If set to `true`, specified topic will be created when it doesn't exist." config_param :autocreate_topic, :bool, :default => false desc 'Publishing messages count per request to Cloud Pub/Sub.' config_param :max_messages, :integer, :default => 1000 desc 'Publishing messages bytesize per request to Cloud Pub/Sub.' @@ -45,10 +47,10 @@ @formatter = formatter_create end def start super - @publisher = Fluent::GcloudPubSub::Publisher.new @project, @key, @autocreate_topic + @publisher = Fluent::GcloudPubSub::Publisher.new @project, @key, @autocreate_topic, @dest_project end def format(tag, time, record) record = inject_values_to_record(tag, time, record) attributes = {}