Greengrass MQTT (Moquette) Broker throwing max size allowed error on UpdateThingShadowRequest with 10KB payload

0

We are running version 2.3.5 and I have verified the max size is 128KB in the broker config:

componentType: "PLUGIN"
configuration:
  moquette:
    host: "0.0.0.0"
    netty.mqtt.message_size: "131072"
    ssl_port: "8883"
  netty.channel.read.limit: 524288
  netty.channel.write.limit: 524288
  startupTimeoutSeconds: "120"
dependencies:
- "aws.greengrass.clientdevices.Auth:HARD"
lifecycle:
  startup:
    timeout: "120"
version: "2.3.5"

Here is the python code calling the shadow update:

update_thing_shadow_request = UpdateThingShadowRequest()
update_thing_shadow_request.thing_name = self.thing_name
update_thing_shadow_request.shadow_name = ''  # Default shadow
update_thing_shadow_request.payload = payload

op = self.publish_ipc_client.new_update_thing_shadow()
op.activate(update_thing_shadow_request)
fut = op.get_response()
result = fut.result(TIMEOUT)

My payload size is well under the maximum allowed:

>>> getsizeof(payload)
10998

However, I get the following error when sending this payload: {"message":"The payload exceeds the maximum size allowed","_service":"aws.greengrass#GreengrassCoreIPC","_message":"The payload exceeds the maximum size allowed","_errorCode":"InvalidArgumentsError"}''}

Is there another setting that I am missing?

질문됨 한 달 전96회 조회
1개 답변
0
수락된 답변

OK, I think I found the answer. It looks like shadows in general cannot exceed 8 KB in size: https://docs.aws.amazon.com/iot/latest/developerguide/diagnosing-shadows.html

답변함 한 달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인