trivago / gollum

An n:m message multiplexer written in Go
http://gollum.readthedocs.org/en/latest/
Apache License 2.0
940 stars 74 forks source link

Fix spoolfile message formatting #248

Closed arnecls closed 5 years ago

arnecls commented 5 years ago

The purpose of this pull request

Since 0.5.0, the spooling format is broken, as messages are written to the spool file in plaintext and not as base64 encoded protobuf.

Config to verify

"Generator":
    Type: "consumer.Profiler"
    Streams: "profile"
    Runs: 1000000
    Batches: 1000
    Characters: "abcdefghijklmnopqrstuvwxyz .,!;:-_"
    Message: "%256s"

"SocketOut":
    Type: "producer.Socket"
    Streams: "profile"
    ChannelTimeoutMs: 10
    Address: "127.0.0.1:5880"
    Modulators: 
        - "format.Runlength"
    ConnectionBufferSizeKB: 128
    FallbackStream: "spooling"
    Batch:
        TimeoutSec: 1
    Acknowledge: "OK"

"Spooler":
    Type: "producer.Spooling"
    Streams: "spooling"
    Path: "test"
    MaxFileSizeMB: 512```

Checklist

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.1%) to 71.642% when pulling 2f190cf3e94301a119a12e173dde26b0a8cdffb0 on fix-spool-format into 208105037562b9c44a5023cf806a7d5d4a506db7 on master.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.05%) to 71.711% when pulling c977963e46ef05e2afcdc1fb8e26f7d5a3e1a0d8 on fix-spool-format into 208105037562b9c44a5023cf806a7d5d4a506db7 on master.