Commit cd41ea664e46f0cc01b52985ffead6e196022782
1 parent
f2b8886c
Added possibility to set max inbound rpc message size
Showing
2 changed files
with
4 additions
and
0 deletions
... | ... | @@ -81,6 +81,8 @@ public class EdgeGrpcService extends EdgeRpcServiceGrpc.EdgeRpcServiceImplBase i |
81 | 81 | private boolean persistToTelemetry; |
82 | 82 | @Value("${edges.rpc.client_max_keep_alive_time_sec}") |
83 | 83 | private int clientMaxKeepAliveTimeSec; |
84 | + @Value("${edges.rpc.max_inbound_message_size:4194304}") | |
85 | + private int maxInboundMessageSize; | |
84 | 86 | |
85 | 87 | @Value("${edges.scheduler_pool_size}") |
86 | 88 | private int schedulerPoolSize; |
... | ... | @@ -102,6 +104,7 @@ public class EdgeGrpcService extends EdgeRpcServiceGrpc.EdgeRpcServiceImplBase i |
102 | 104 | log.info("Initializing Edge RPC service!"); |
103 | 105 | NettyServerBuilder builder = NettyServerBuilder.forPort(rpcPort) |
104 | 106 | .permitKeepAliveTime(clientMaxKeepAliveTimeSec, TimeUnit.SECONDS) |
107 | + .maxInboundMessageSize(maxInboundMessageSize) | |
105 | 108 | .addService(this); |
106 | 109 | if (sslEnabled) { |
107 | 110 | try { | ... | ... |
... | ... | @@ -705,6 +705,7 @@ edges: |
705 | 705 | enabled: "${EDGES_RPC_SSL_ENABLED:false}" |
706 | 706 | cert: "${EDGES_RPC_SSL_CERT:certChainFile.pem}" |
707 | 707 | private_key: "${EDGES_RPC_SSL_PRIVATE_KEY:privateKeyFile.pem}" |
708 | + max_inbound_message_size: "${INTEGRATIONS_RPC_MAX_INBOUND_MESSAGE_SIZE:4194304}" | |
708 | 709 | storage: |
709 | 710 | max_read_records_count: "${EDGES_STORAGE_MAX_READ_RECORDS_COUNT:50}" |
710 | 711 | no_read_records_sleep: "${EDGES_NO_READ_RECORDS_SLEEP:1000}" | ... | ... |