Skip to content

LogMessage marshalling fails on large messages #688

@jghiloni

Description

@jghiloni

When using ReactorDopplerClient, very large messages can cause ReactiveDopplerEndpoints.toEnvelope fail with an EOFException.

Steps to reproduce (abstract):

  1. Have a ReactorDopplerClient listening to the CF firehose
  2. Log an app message (thus generating a LogMessage) where the total size of the envelope is greater than 4096 bytes.

Steps to reproduce (concrete):

  1. Start and run the nozzle at https://github.com/jghiloni/test-log-nozzle outside of CF (for ease)
  2. Push the app at https://github.com/jghiloni/cfclient-msgsize-test
  3. Hit https://msg-test.<APP_DOMAIN>/msg/ starting at 4096 and working down until the nozzle works. In our environment, that was 3946.

How I tested:
I added a line in ReactorDopplerEndpoints::toEnvelope to make it look like this:

private static Envelope toEnvelope(byte[] bytes) {
        try {
            // added this line
            System.out.println("Envelope size: " + bytes.length);
            return Envelope.from(org.cloudfoundry.dropsonde.events.Envelope.ADAPTER.decode(bytes));
        } catch (IOException e) {
            e.printStackTrace();
            throw Exceptions.propagate(e);
        }
    }

And watched for my messages to come through to note 4096, and correlated to the message size. This matches what we saw with fewer debugging options on my client's system.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions