Comparison of attachment processing modes
To compare the processing modes for attachments and determine whether streaming is optimal, consider the modes that support attachments.
- Allow
- The allow mode provides greater processing of XML attachments than the more limited processing
of the streaming mode. The allow mode is the only mode that provides full processing. When
processing is needed and attachments are small and might need to be buffered, allow mode is the best
choice. Attachments are buffered when an action in the processing rule requests any of the following cases.
- Needed attachments
- All attachments up to the root part of the message
- All attachments in the package before the needed attachment
- All attachments in the package for a needed manifest
- All attachments in the package if the package does not contain the needed attachment
- Streaming
- The streaming mode is best for large attachments, but this mode provides limited processing.
Messages in the form of SOAP with attachments are supported.
Setting to streaming mode does not necessarily mean that attachments are streamed. Based on the input message, the rules must be configured correctly to prevent the attachment from being buffered. With properly configured rules and well-formed input messages, the DataPower® Gateway does not need to buffer an attachment. If the stylesheets can process the attachment as a piece of data without referencing the attachment, streaming mode is the preferred choice.
Consider the following behaviors of streaming attachments.- Processing can be applied individually to each attachment.
- The DataPower Gateway does not create a manifest of all attachments.
- Attachments must be accessed and processed in the order that they are in the package.
- If streaming fails, for instance due to an incompatible processing action or stylesheet, the attachment is buffered.
- Unprocessed
- Unprocessed mode allows messages with attachments but does not process the attachments. This
mode allows the forwarding of large attachments. The root part of the message, which typically
contains a SOAP message, is subject to filter and transform actions. No processing of parts other
than the root part is possible. Accompanying documents can be passed intact.
In contrast to allow mode, which buffers referenced attachments, unprocessed mode forwards the attachment and logs a warning when a rule references an attachment. Unprocessed mode is the best choice for large attachments that do not need to be processed. Unprocessed mode does not inadvertently buffer the attachment.
In the unprocessed mode, you can enable flow control on the message attachments to prevent the attachments from being buffered on the DataPower Gateway.