Currently we are always slurping the full InputStream in the body of the request into a String (see here for the code). This is being done on ALL incoming requests. This is bad for several reasons. One is with the new code that rejects payloads that are too large. If we always slurp it in, we could get a payload too large for the String of it to fit in memory. If we need to parse the JSON, it's much better to just pass in the stream. If we can avoid converting to a string entirely (i.e. transfer the data to AMQ in raw bytes) that's even better.
After this is fixed, we should be able to accept arbitrarily large POST bodies and reject them properly. This should also be faster and more memory efficient.