Shard Envelope Size

Hello,

Is there any way I can configure the maximum size of the shard envelope. I have a base 64 encoded image I get from a HTTP endpoint. When I send to the backend shard from my HTTP route using a shard envelope, I get the following error.

akka.remote.OversizedPayloadException: Discarding oversized payload sent to Some(Actor[akka://CadmiumCluster@127.0.0.1:2552/system/sharding/PoiManagerActor#-442885889]): max allowed size 262144 bytes. Message type [akka.cluster.sharding.typed.ShardingEnvelope].

Regards
Meeraj

Hi @kunnum,

it is possible to increase the max size for messages sent around the cluster but it’s not the best solution. If you are still using Classic Remoting (based on Neety) I would suggest you considered migrating to Artery. Artery introduced a side-channel dedicated to the delivery of big payloads (Artery Remoting • Akka Documentation). You need to configure the actors you wish used the large messages stream.

Hope this helps,

Thank you, that worked!!

Kind regards

That seems to be working on the way in. However, when responses are above a certain limit (262144), with the same configuration it fails to serialize.

akka.remote.OversizedPayloadException: Discarding oversized payload sent to Some(Actor[akka://CadmiumCluster@127.0.0.1:2551/temp/PoiManagerActorProxy$d]): max allowed size 262144 bytes. Message type [[B].

I believe on the return path I need to configure the reply actor proxies.