When we are trying to send a large pubsub json message to a group, the pubsub rest api is throwing 500 Internal Error. We are using azure messaging python sdk to send message to a pubsub group. We checked the request content length of the api call and found it to be 6903 Bytes. Below is the code for the same:
response = pubsub_service_client.send_request(
build_send_to_group_request(
settings.AZURE_PUBSUB_HUB_NAME,
group,
json=data,
)
)
print(response)
print(response.request.headers)
The output of above code for large data variable is :
<HttpResponse: 500 Internal Server Error, Content-Type: plain/text>
{'Content-Length': '6903', 'Content-Type': 'application/json', 'User-Agent': 'azsdk-python-messaging-webpubsubservice/1.0.0b1 Python/3.7.3 (Darwin-19.5.0-x86_64-i386-64bit)', 'Authorization': 'Bearer <Redacted access token>'}
We want to know the size limit of the pubsub message, if any, which can be published to a group or directly sent to a user.