Broadcom API Gateway: Maximum size of a JMS message not honoured - error "jmsRequestHandlerImpl: Request message too large"
search cancel

Broadcom API Gateway: Maximum size of a JMS message not honoured - error "jmsRequestHandlerImpl: Request message too large"

book

Article ID: 270454

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Despite io.jmsMessageMAxBytes cluster-wide properties being set to 9437184 bytes (9MB), requests with a payload over 4.5MB generates the following error:

2023-07-11T11:55:15.668+1000 INFO    956 com.l7tech.server.transport.jms2.JmsRequestHandlerImpl: Request message too large
2023-07-11T11:55:15.670+1000 FINE    956 com.l7tech.common.io.XmlUtil: Getting Document Builder
2023-07-11T11:55:15.670+1000 FINE    956 com.l7tech.server.transport.jms2.JmsRequestHandlerImpl: No response will be sent!
2023-07-11T11:55:15.670+1000 FINE    956 com.l7tech.server.audit.AuditContextImpl: MessageSummaryAuditRecord generated with level null will not be saved; current message audit threshold is WARNING

 

 

Environment

API Gateway

Cause

Usually, this is caused by a wrong value assigned to the cluster-wide property. 

Payloads that are using "text message" content-type, are encoded in UTF-8 (Unicode) when sent through a request. To correctly calculate the adequate value to assign to io.jmsMessageMAxBytes, we need to count the total number of characters included in the text and multiply by 2. This is because Unicode can use one or more bytes for each single character.  

 

Resolution

Increase the value assigned to io.jmsMessageMAxBytes accordingly