fluent-plugin-gcloud-pubsub-custom 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 702ae45ef8246c99127824b67457c6bf2b8a7e15
4
- data.tar.gz: 094ed9fbc03b448390e123328a835e6898c97e97
3
+ metadata.gz: 2fd80971b144486ed5200c6e8a3680275f3b2af0
4
+ data.tar.gz: fcddbba7b68cb1ad6ce4fc72b9bce3df3fce2688
5
5
  SHA512:
6
- metadata.gz: dc1f80d983a3cf20a3205778f0b97ad97a5c866f51f504daeaa7ef70952648d0cf3b20fd6270de4c576f49c2148bd83671c645adc5d3c4dc52c43fb0f8ca76cb
7
- data.tar.gz: 6bd444101d59692f9f064fcbe518ac0c5483c47e860ec890e4625d0cb0b7848c3cd7911391a0e1273d1760129cd84cb962bfb4a80f4776a01e68f181c0c19b29
6
+ metadata.gz: bb4c1f75828bb55177f1a35a159e61925c45afb6cb6ecc07d5d6c29dd4215b002289beb293dd2cdf94255444f44469fecd4ede53571b291e0c5d0d732460b964
7
+ data.tar.gz: 4526515a2b03759ca0c306288d7940a0fdac4b12f80809fed493e10a08c64d9edd43f7ae29a8ff41788dfcc5d9aaafc45a28fb420e54038e02c4efa4e376ff0c
data/README.md CHANGED
@@ -65,8 +65,8 @@ Use `gcloud_pubsub` output plugin.
65
65
  - `max_messages` (optional, default: `1000`)
66
66
  - Publishing messages count per request to Cloud Pub/Sub.
67
67
  - See https://cloud.google.com/pubsub/quotas#other_limits
68
- - `max_total_size` (optional, default: `10000000` = `10MB`)
69
- - Publishing messages bytesize per request to Cloud Pub/Sub.
68
+ - `max_total_size` (optional, default: `9800000` = `9.8MB`)
69
+ - Publishing messages bytesize per request to Cloud Pub/Sub. This parameter affects only message size. You should specify a little smaller value than quota.
70
70
  - See https://cloud.google.com/pubsub/quotas#other_limits
71
71
  - `buffer_type`, `buffer_path`, `flush_interval`, `try_flush_interval`
72
72
  - These are fluentd buffer configuration. See http://docs.fluentd.org/articles/buffer-plugin-overview
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.license = "MIT"
8
8
  gem.homepage = "https://github.com/mia-0032/fluent-plugin-gcloud-pubsub-custom"
9
9
  gem.summary = gem.description
10
- gem.version = "0.1.1"
10
+ gem.version = "0.1.2"
11
11
  gem.authors = ["Yoshihiro MIYAI"]
12
12
  gem.email = "msparrow17@gmail.com"
13
13
  gem.has_rdoc = false
@@ -11,7 +11,7 @@ module Fluent
11
11
  config_param :topic, :string
12
12
  config_param :autocreate_topic, :bool, :default => false
13
13
  config_param :max_messages, :integer, :default => 1000
14
- config_param :max_total_size, :integer, :default => 10000000 # 10MB
14
+ config_param :max_total_size, :integer, :default => 9800000 # 9.8MB
15
15
  config_param :format, :string, :default => 'json'
16
16
 
17
17
  unless method_defined?(:log)
@@ -65,7 +65,7 @@ module Fluent
65
65
  private
66
66
 
67
67
  def publish(messages)
68
- log.debug "send message topic:#{@topic} length:#{messages.length.to_s}"
68
+ log.debug "send message topic:#{@topic} length:#{messages.length} size:#{messages.map(&:bytesize).inject(:+)}"
69
69
  @publisher.publish messages
70
70
  end
71
71
  end
@@ -30,7 +30,7 @@ class GcloudPubSubOutputTest < Test::Unit::TestCase
30
30
  assert_equal('key-test', d.instance.key)
31
31
  assert_equal(false, d.instance.autocreate_topic)
32
32
  assert_equal(1000, d.instance.max_messages)
33
- assert_equal(10000000, d.instance.max_total_size)
33
+ assert_equal(9800000, d.instance.max_total_size)
34
34
  end
35
35
 
36
36
  test '"topic" must be specified' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-gcloud-pubsub-custom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshihiro MIYAI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-27 00:00:00.000000000 Z
11
+ date: 2016-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd