ChugR opened a new pull request #694: DISPATCH-975: Enforce max message size on message ingress URL: https://github.com/apache/qpid-dispatch/pull/694 This commit has an updated implementation for further review. Notes: MaxMessageSize may be specified globally, per vhost, or per vhost user group. The global setting applies to all vhosts for which maxMessageSize is unspecified. The vhost setting applies to all vhost user groups for which maxMessageSize is unspecified. The vhost user group setting overrides all other settings. A maxMessageSize setting of zero disables maxMessageSize enforcement. Links over which maxMessageSize is being enforced will advertise the size in the _max-message-size_ field of the Attach frame. Qpid-dispatch ignores the _max-message-size_ field received in incoming Attach frames. Message size for maxMessageSize purposes is calculated to be the number of AMQP octets in the Annotated Message. This includes the header, delivery-annotations, message-annotations, properties, application-properties, application-data, and footer sections. Administrators and users must be aware that a "message" consisting a single character string (the application-data) will be much larger over the wire after properties and annotations have been inserted. Max message size is enforced on message/transfer ingress only. Once a message has entered the router network it is free to go to any destination. When a message exceeds max size then: * Disposition of _rejected_ is returned to the sender for that delivery. * Ingress link to qpid-dispatch is closed with an error. * Copies of the message being delivered through the router network are aborted. In message.c oversize messages are detected and then handled as oversize, discarded, and aborted. In router_node.c oversize messages are logged, links are closed, and downstream deliveries are disconnected. ToDo: Fix issues in DISPATCH-1581 where policy settings and counters are _int_ and not _uint64_. That will be a separate work stream. Fix all resource leaks. Certain patterns of client activity leak qd_message, qd_link, and qd_disposition resources. Sometimes. More testing required. Characterize some issues that AMQP clients suffer when oversize messages are denied. Clients fail in mysterious ways and some hints on what is happening and what to do about it will speed client development. Improve single-router test to cover multiple routers.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
