0

We want to process large response (tens of MB) using Spring WebClient. We are encountering org.springframework.core.io.buffer.DataBufferLimitException as discussed here. But we do not want to increase the buffer size. We are only using a small subset of the response so if there is a way to directly pipe the response stream to Jackson for de-serialization, we could spare lots of unnecessary memory allocations. Is it possible to skip the buffer or not?

Lukas
  • 13,606
  • 9
  • 31
  • 40
  • unless you're dealing with a streaming response (i.e. multiple messages), you'd end up with the same problem: you'll be buffering the whole thing in memory with Jackson since you can't really deserialize a JSON document until it's completely there. – Brian Clozel Dec 10 '20 at 19:08

1 Answers1

0

It seems that it's not possible. At the end we switched to plain OkHttp client and it handles the same load without any issue.

Lukas
  • 13,606
  • 9
  • 31
  • 40