@Override
    public void startZipEntry() throws IOException {
        endZipEntry();

        count++;

        // Write meta.
        final String base = Strings.padStart(Long.toString(count), 10, '0');
        String dataFileName = base + DATA_EXTENSION;
        String metaFileName = base + META_EXTENSION;

        final AttributeMap effectiveAttributeMap;
        if (attributeMap != null) {
            // A passed in attributeMap trumps the stream metadata
            effectiveAttributeMap = attributeMap;
            LOGGER.debug("Using attributeMap: {}", attributeMap);
        } else if (metaDataHolder != null) {
            effectiveAttributeMap = metaDataHolder.getMetaData();
            LOGGER.debug("Using metaDataHolder: {}", effectiveAttributeMap);
        } else {
            effectiveAttributeMap = null;
        }

        if (effectiveAttributeMap != null) {
            // TODO : I'm not sure where/who is setting fileName in meta so will leave for now.
            final String fileName = effectiveAttributeMap.get("fileName");
            if (!NullSafe.isBlankString(fileName)) {
                dataFileName = fileName;
                final int index = fileName.lastIndexOf(".");
                if (index != -1) {
                    metaFileName = fileName.substring(0, index) + META_EXTENSION;
                } else {
                    metaFileName = fileName + META_EXTENSION;
                }
            }

            zipOutputStream.putArchiveEntry(new ZipArchiveEntry(metaFileName));
            AttributeMapUtil.write(effectiveAttributeMap, zipOutputStream);
            zipOutputStream.closeArchiveEntry();
        }

        currentZipEntry = new ZipArchiveEntry(dataFileName);
        zipOutputStream.putArchiveEntry(currentZipEntry);
    }
Use the attributes from the supplied attributeMap
stroom-pipeline/src/main/java/stroom/pipeline/writer/ZipOutput.java