SFTP pull destination overview
The SFTP pull destination is the message partition channel from which AS4 Microservice pulls the message response. In an SFTP message exchange, the messages that can be pulled by a trading partner are stored in the pull destination.
In a one-way pull message exchange, the business application sends the message to be pulled to a specified messaging receiver. The message is picked up from the messaging receiver and looks up for the exchange profile. As the exchange profile for the message is an SFTP pull exchange profile, the message is associated with the SFTP pull destination that is specified in the exchange profile. The receiving application receives the pull request signal message, and allows the message (submitted by the business application) to be pulled based on the SFTP pull destination and other details that are specified in the signal message.
File permissions for inbound SFTP pull exchanges
When an SFTP file is put in a location to be pulled, that file is given read permissions only for that specific SFTP user or group. Therefore, only that SFTP user or group can retrieve the file. If the file is put into the file system externally, the file is assigned an SFTP user that consists of system and group permissions. These permissions are set to read for the user's group if (and only if) the SFTP user has an exchange that is associated with that directory.
To pull a file, the SFTP user must continue to be a part of an active pull exchange on the directory that contains the file, regardless of whether the pull exchange has a trigger.
- If the pull exchange has a trigger, the file is only available to the SFTP user associated with the exchange that made the file available. In this scenario, the file's user is set to that SFTP user and the group is set to a group that contains users with the same read permissions as that user.
- If the pull exchange has no trigger and the SFTP user is a member of an exchange that is related to that directory, the file is available to any SFTP user associated with that exchange. In this scenario, the file's user is set to system and the group is set to users with read permissions.
Resending pull request
If a trading partner does not receive the pulled message, the trading partner can send another pull request based on the reception awareness configuration (Number of retries and Interval for receipts fields) in the conformance policy. If receipts are configured and the owner organization does not receive a receipt from the trading partner, the message to be pulled is made available in the SFTP pull destination after the time specified in the Interval for receipts field. The trading partner can then send another pull request to pull the message.
Purging of messages in the SFTP pull destination
- Expiration time stamp - An expiration time stamp is specified for the pull message that the business application submits to AS4 Microservice. The expiration time stamp is calculated based on the time when the message was created and the data retention period that is specified for the SFTP pull destination. A message in the SFTP pull destination is purged if the expiration time stamp is reached when the purge schedule runs.
- Maximum number of pulls - The maximum number of pulls and the retransmission
pull interval for a message depends on the reception awareness configuration in the conformance
policy. The message in the SFTP pull destination is purged after a receipt is received for the
pulled message or after the number of retransmissions (configured in the conformance policy) is exhausted.
- If receipts are configured and a receipt is not received for a pulled message, the trading partner can send an SFTP pull request after the time specified in the Interval for receipts.
- If receipts are configured and a receipt is received from the trading partner for a pulled message, the message is purged.
- If receipts are not configured, the message is purged from the pull destination after the pull request is completed.
If a message in the SFTP pull destination is not pulled (or a receipt is not received) after the specified number of retransmission attempts, the message is purged when the purge schedule runs and a notification is sent to the business application.
Selective pulling
A specific message or several specific messages can be pulled from the SFTP pull destination based on the exchange profile configuration and a few parameters that are specified in a pull request.
- Pull destination
- Service
- Agreement URI
- ConversationId
- AgreementRef
- Service
- Action
- RefToMessageId
A specific message or messages that match the parameters that are specified in the pull request are pulled.
Message pulling order
- The earliest message or first in message
- The least pulled message
Entry | Creation time | Number of times pulled | Pulled |
---|---|---|---|
Entry 1 | 8:00 AM | 1 | No |
Entry 2 | 9:00 AM | 0 | Yes |
Entry 3 | 10:00 AM | 2 | No |
Entry 4 | 11:00 AM | 2 | No |