Publishing messages results in a connection error because the message's Content Header Frame is too large:
Original error : Content headers exceeded max frame size: xxx,xxx > 131,072
This means the message headers exceed the server's default maximum frame size (frame_max), typically 131,072 bytes (128 KB).
The AMQP protocol uses frames as its basic unit of data transfer. .
The message Body (payload) can be split across multiple Body Frames if it exceeds frame_max.
However, the Content Header Frame (which holds all message properties/metadata) must fit entirely within one frame.
When accumulated headers (e.g., from excessive dead-lettering) exceed the negotiated server-side frame_max limit, the broker closes the connection.
The frame_max limit is a server-side configuration parameter negotiated at the start of the connection. It can be increased on the RabbitMQ service instance.
cf update-service MY-INSTANCE -c '{"frame_max": 262144}'
In addition to the server-side change, you may need to update your client library if you are using an older version, especially with Node.js. Older clients might impose their own lower limits on the initial frame size negotiation, or have bugs related to large frame sizes.
Please refer to the link for context on client library frame size updates