7

I'm trying to pass 5MB~ data from a service to an actor, and I'm getting the error:

Fabric Message is too large

How can I increase the maximum size that can be transferred between micro-services?

I looked at the following page to see my options.

I tried setting:

<Section Name="ServiceReplicatorConfig">
    ...
    <Parameter Name="MaxReplicationMessageSize" Value="1073741824" />
</Section>

Please help.

shlatchz
  • 1,612
  • 1
  • 18
  • 40

2 Answers2

6

Somebody helped me on GitHub with the following:

In order to set maximum size for the remoting transport, you can use the following attribute and place it on your actor interface assembly or configure the maximum message size in the ServiceProxyFactory and ServiceRemotingListener creation.

[assembly: FabricTransportActorRemotingProvider(MaxMessageSize = 1073741824)]

https://msdn.microsoft.com/en-us/library/azure/microsoft.servicefabric.actors.remoting.fabrictransport.fabrictransportactorremotingproviderattribute.aspx

The discussion in GitHub.

shlatchz
  • 1,612
  • 1
  • 18
  • 40
2

Can you just pass a reference to that data like a URL to a blob/document storage? Passing 5MB of data within the SF service/actors is quite big and SF is not designed to store that big of data or state.

alltej
  • 6,787
  • 10
  • 46
  • 87
  • I'm passing it to an actor that is supposed to write it to a blob storage... There must be a way for me to change that setting and increase the max size that can be passed between micro-services... – shlatchz May 01 '16 at 07:11
  • An example is an image processing micro services where an API accepts an image bytes for processing. API saves them to blob store that returns a URL. Send the request to stateless microservice with the URL. The stateless microservice can stream in the bytes back because it has reference to the URL. – alltej May 01 '16 at 11:58
  • You can pass also the request to a stateful service and store the URL in reliable queue. The stateful service can later call the stateless service to process it. – alltej May 01 '16 at 12:03
  • I wanted to handle the writing outside of the stateless API service. That's why the stateless API is calling an actor that is in charge of writing the data to a blob. – shlatchz May 01 '16 at 12:20