How the MQ Managed File Transfer agent property maxFilesForTransfer works

 View Only

How the MQ Managed File Transfer agent property maxFilesForTransfer works 

Wed March 04, 2020 01:25 PM

How the MQ Managed File Transfer agent property maxFilesForTransfer works

Paul Titheridge
Published on 26/09/2017 / Updated on 29/09/2017

Someone was asking me the other day about the agent property maxFilesForTransfer. According to the information in the The agent.properties file topic in the MQ sections of IBM Knowledge Center, the property allows users to specify the maximum number of transfer items (files or messages) that can be included in a single managed transfer, and defaults to the value 5000. This property wasn’t one that I had come across before, so I thought I’d do some investigation to find out how it works.

Setting “maxFilesForTransfer” on a source agent
When the source agent receives a managed transfer request, the first thing it does is to check the transfer specification to see if it contains a list of specific transfer items to move, or if it contains a wildcard. If the transfer specification contains a wildcard, then the source agent will perform some processing to resolve the wildcard into a list of transfer items.

Once the source agent has a list of specific transfer items to move as part of the managed transfer, it checks the number of items in the list. If the number of transfer items in the list is equal to or less than the value of the maxFilesForTransfer property, then the source agent will proceed with the managed transfer.
However, if the number of transfer items is greater than the value of the property, then the source agent will fail the managed transfer with the error:
BFGSS0033E: Too many files specified for transfer sending agent (limit is: [value of maxFilesForTransfer])

Figure 1: How a source agent uses the maxFilesForTransfer property

Setting “maxFilesForTransfer” on a destination agent
Once the source agent has decided to proceed with the managed transfer, it sends a request to the destination agent asking if is OK to participate. When the destination agent receives this request, it looks at the number of transfer items that the source agent wants to transfer, and compares it to the value of its maxFilesForTransfer property. If the number of transfer items is equal to or less than the value of this property, then the destination agent will proceed with the managed transfer.

If the number of transfer items is greater than the value of the property, though, the destination agent sends a message back to the source agent, indicating that the managed transfer cannot proceed. The source agent then marks the managed transfer as Failed with the error:
BFGSS0032E: Too many files specified for transfer receiving agent (limit is: [value of maxFilesForTransfer])

Figure 2: How a destination agent uses the maxFilesForTransfer property

Examples
Here are some examples, that shows how this works.

Suppose we have two agents, AGENT1 and AGENT2. AGENT1 is the source agent for managed transfers, and AGENT2 acts as the destination agent. AGENT1 has been configured with the property:

maxFilesForTransfer=5

set in its agent.properties file, while AGENT2 does not have property set, which means that it will use the default value of 5000.

A managed transfer request is submitted to AGENT1 which contains five items:

File1.txt
File2.txt
File3.txt
File4.txt
File5.txt

When the agent picks up the managed transfer request, it finds that it contains 5 transfer items. As this is equal to the value of the maxFilesForTransfer property, the agent proceeds with the managed transfer, and sends a message to AGENT2 asking if it is OK to participate. AGENT2 receives the request, and checks the number of transfer items it contains, which is 5. Because the property has not been set on AGENT2, the agent uses the default value of 5000. As the number of transfer items in the transfer request is less than 5000, AGENT2 is happy to proceed with the managed transfer. As a result, all five files are moved from AGENT1 to AGENT2.

Now, suppose AGENT1 receives a new managed file transfer request that contains 6 transfer items:

File1.txt
File2.txt
File3.txt
File4.txt
File5.txt
File6.txt

This time, the agent processes the managed transfer request and finds that the number of transfer items it contains is greater than the value of the maxFilesForTransfer property. AGENT1 immediately marks the managed transfer as Failed, with the error:

BFGSS0033E: Too many files specified for transfer sending agent (limit is: 5)

Now, let’s suppose that AGENT2 is reconfigured with the following entry in its agent.properties file:

maxFilesForTransfer=1

After AGENT2 has been stopped and restarted (so that the new value for the property is picked up), AGENT1 receives a new managed transfer request containing two transfer items:

File1.txt
File2.txt

AGENT1 processes the managed transfer request and finds that it contains 2 items. This is less than the value of the maxFilesForTransfer property, so AGENT1 carries on and sends a message to AGENT2 asking if it is OK to take part. AGENT2 receives this message, and finds that there are two transfer items that need to be processed. As this is greater than the value of the agent’s maxFilesForTransfer property, AGENT2 sends back a message to AGENT1 indicating that the transfer cannot proceed. This causes the source agent to mark the managed transfer as Failed, with the error:

BFGSS0032E: Too many files specified for transfer receiving agent (limit is: 1)

As always, I hope this helps! If you have any questions about this property, feel free to ask.

 

Entry Details

Statistics
0 Favorited
2 Views
1 Files
0 Shares
2 Downloads
Attachment(s)
pdf file
How the MQ Managed File Transfer agent property maxFilesF....pdf   195 KB   1 version
Uploaded - Wed March 04, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.