Sandbox options through Java API

Hi,

How in Java do I pass sandbox based options such as maxInboundMessageSize ? I cannot find it in the javadoc.

thanks

1 Like

The only way I found is through using the NettyChannelBuilder directly … is there no default System Level properties?

1 Like

There are options in both directions here:

  1. The max inbound message size on the ledger. In this case “inbound” refers to messages going into the ledger so messages that you sent from your Java client or any other client. You cannot control that option via the Java bindings for Sandbox or any other ledger. How exactly you set this depends on the ledger but most of them accept a --max-inbound-message-size CLI option.

  2. The max inbound message size of the client, e.g., the Java bindings, DAML Script, DAML Triggers, …. For the Java bindings, this is controlled via the NettyChannelBuilder. I’m not aware of a system level property for this. Here’s a full example of how you can set this:

DamlLedgerClient.
  newBuilder(
    NettyChannelBuilder.
      forAddress("localhost", ledgerPort).
      maxInboundMessageSize(1000000)).
  build()
2 Likes