IBM MQ File Transfer Edition (FTE) empowers users to efficiently move files between different locations, whether it’s via file shares, SFTP, or MQ queues. Setting up agents or bridge agents allows for seamless file transfers, either through scheduled tasks or more sophisticated resource monitoring mechanisms.

However, there are scenarios where standard configurations might not meet specific requirements. For instance, consider a situation where files need to be transferred only if their size exceeds zero, and the size remains unchanged for a certain number of polling cycles. Although configuring trigger conditions in the resource monitor seems intuitive, it may not always work as expected.

In such cases, IBM provides a powerful solution: resource monitor user exit. These exits allow users to extend the functionality of FTE agents by writing custom Java classes that execute when the resource monitor is triggered. By leveraging these exits, users gain granular control over transfer metadata and can implement tailored logic to cancel or modify transfer tasks based on specific conditions.

Here’s a step-by-step guide on how to implement a custom resource monitor exit:

1. Identify the Requirement: Determine the specific conditions under which file transfers should occur. In our case, we need to ensure that files are only transferred if their size is greater than zero and remains unchanged for a defined number of polling cycles.

2. Create the Java Class: Develop a Java class that implements the necessary logic to verify file metadata and determine whether to proceed with the transfer. In our example, the class would check the file size and return a result indicating whether to cancel the resource monitor trigger.

3. Compile the Java Class: Once the Java class is ready, compile it into a Java Archive (JAR) file.

4. Deploy the JAR File: Place the compiled JAR file into the “exits” folder of the FTE agent. This folder serves as the default location for custom exits.

5. Configure Agent Properties: Update the agent.properties file to specify the custom exit class for the resource monitor. This ensures that the agent uses the custom exit when the resource monitor is triggered.

monitorExitClasses=com.ibm.wmqfte.monitor.TestMonitorExit

 6. Restart the Agent: After making the necessary configurations, restart the FTE agent to apply the changes. Monitor the agent’s output.log to ensure that the custom exit is being invoked correctly.

By following these steps, users can seamlessly integrate custom logic into their FTE deployments, allowing for greater flexibility and control over file transfer operations. Whether it’s enforcing specific transfer conditions or implementing advanced monitoring capabilities, custom resource monitor exits empower users to tailor FTE to their unique requirements.

IBM Integration Specialists

Enabling Digital Transformations.

Recent news
Let's get in touch...

info@integrationdesigners.com

​ Find us here

Veldkant 33B
2550 Kontich
Belgium

Pedro de Medinalaan 81
1086XP Amsterdam
The Netherlands

© 2019 Integration Designers - Privacy policy - Part of Cronos Group integr8 consulting