Testing Applicationĭrop the plain file to the folder location that you have specified in inbound file connector. It will be used to store the compressed file. This is used if transformers are auto-selected and to validate that the transformer returns the correct type.įinally, place the outbound file connector at the end of message processor. The class of the message generated by the transformer. If false, the chain ends, keeping the result generated up to that point. If a transformer forms part of a chain and cannot accept the current message class, this flag controls whether the remaining part of the chain is evaluated. Such transformers are never called with an inappropriate input (whatever the value of this attribute). Many transformers only accept certain classes. The mime type (i.e., text/plain or application/json). Place the GZIP Compress transformer after the String to Byte Array transformer.Ī unique name for GZIP Compress in your Mule application (no spaces).Ī string encoding used for transformer output. So, place the String to Byte Array transformer in the message processor region after the inbound file connector. Now, you need to convert the message into a byte array. Place the file connector into the message source in the flow and configure it. Now, we will walk through the GZIP Compress and Uncompress transformers.
MuleSoft provides out-of-box GZIP Compress and Uncompress to achieve this. There is often a requirement that we need to compress or uncompress a message payload at the end of operations. GZIP Compress is used to compress a byte array and GZIP Uncompress is used to uncompress a byte array.