You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consul's Agent API automatically switches to chunked responses when service discovery information becomes significantly large. Based on #2286, the HTTP client in the Consul namer does not handle chunked responses properly because the JSON parser expects the JSON data to be the entire payload when it begins parsing. The namer should be able to handle this scenario.
The text was updated successfully, but these errors were encountered:
This work is continuation of #2287. In essence the change enables `streaming` for the consul http client and as a result of that makes handling large consul responses easier (i.e. not limited by max size config). The PR exposes the `fixedLengthStreamedAfterKB` which as described in the docs
> configures `fixedLengthStreamedAfter` limit, which effectively turns on streaming (think `withStreaming(true)`). The `fixedLengthStreamedAfter`, however, disables streaming for sufficiently small messages of known fixed length.
In order to reproduce the initial issue and validate the solution you can use the method described by @dadjeibaah in #2287. Note that if you want to see the initial issue you need to first run against [this](753fc17) version of the code. After this PR is applied you can run the example again and convince yourself that exception is not thrown despite the fact that the message size configuration is not tweaked.
Fixes#2288
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Consul's Agent API automatically switches to chunked responses when service discovery information becomes significantly large. Based on #2286, the HTTP client in the Consul namer does not handle chunked responses properly because the JSON parser expects the JSON data to be the entire payload when it begins parsing. The namer should be able to handle this scenario.
The text was updated successfully, but these errors were encountered: