To have full control and achieve best possible performance, we recommend using direct Kafka access and fallback to REST APIs only in case direct Kafka access is not available for certain reasons (such as proxy settings or firewalls).
The maximum throughput and parallelization for stream layer is set up during stream layer creation. You can specify the maximum throughput for data going into the layer and, separately, the maximum throughput for data going out of the layer.
The service starts throttling inbound messages when the inbound rate exceeds the inbound throughput. It starts throttling outbound messages when the total outbound rate to all consumers exceeds the outbound throughput. When throttling occurs, the service response is delayed but no messages are dropped.
The maximum messages size for a stream layer is 1 MB. For messages larger than 1 MB it is recommended to upload the data to Blob API first and pass a message in stream by reference (data handle). If you are using the HERE Data SDK for Java & Scala this is done automatically for you.