Configuring Additional Properties for File Transfers
To support file transfers, the configuration file (emessage-all.conf) for the eMessage Connector provides several settings that you may want to configure. The only required settings for a file upload are the URL of the ThingWorx Platform and the target repository on the ThingWorx Platform. Note that all file uploads will use this configured File Repository (represented by a File Repository Thing in the ThingWorx Platform). The default repository is the SystemRepository. For a file download, the only required setting is the URL for source file to be downloaded. You should have set these properties already when editing the emessage.conf file for your installation. They are shown in boldface type below. The other settings are optional and have default values, as shown here:

emessage {
file-transfer
upload {
url = "https://myEmessageConnector:8443/upload"
targetRepository = "SystemRepository"
retry.count = 3
retry.delay.min = 1000
retry.delay.max = 10000
chunk.delay = 0
chunk.size = 1048576
compressionHighThreshold = 2147483647
requireOverallMD5 = false
}
download {
url = "https://myEmessageConnector:8443/download"
retry.count = 3
retry.delay.min = 1000
retry.delay.max = 10000
chunk.delay = 0
chunk.size = 1048576
}
}
The following table lists and describes all of these properties as they apply to File Uploads and File Downloads:
Property
File Uploads
File Downloads
url
The URL to which the agent will upload files. The URL should be composed of the address of the eMessage Connector (https://<hostName>:<port>) plus /upload.
The URL from which the file will be downloaded to the device. The URL should be composed of the address of the eMessage Connector (https://<hostName>:<port>) plus /download.
targetRepository
The FileRepository on the ThingWorx Platform where an uploaded file will be stored (if none is specified in the request). The default value for this property is the SystemRepository. Note that this information is the only property/value that is not sent to the agent.
Not applicable
retry.count
The number of times that the agent should attempt the upload. The default value is 3 times, which means that after the first attempt fails, the agent attempts the upload 3 more times.
The number of times that the Connector should attempt the download. The default value is 3 times, which means that after the first attempt fails, the Connector attempts the download 3 more times.
retry.delay.min
The minimum number of milliseconds that the agent should wait before retrying an upload. The default value is 1000 ms, which means that the agent will wait a minimum of one second before retrying an upload.
The minimum number of milliseconds that the Connector should wait before retrying a download. The default value is 1000 ms, which means that the Connector will wait a minimum of one second before retrying a download.
retry.delay.max
The maximum number of milliseconds that the agent should wait before retrying an upload. The default value is 10000 milliseconds, which means the agent should wait 10 seconds between retries.
The maximum number of milliseconds that the Connector should wait before retrying a download. The default value is 10000 milliseconds, which means the Connector should wait 10 seconds between retries.
chunk.delay
The number of milliseconds that the agent will wait before uploading the next chunk. The default value is 0, which means that the agent starts the next chunk immediately after sending the previous chunk.
The number of milliseconds that the Connector will wait before downloading the next chunk. The default value is 0, which means that the Connector starts the next chunk immediately after sending the previous chunk.
chunk.size
The number of bytes per chunk that the agent will send in each POST. The default chunk size is 1048576 bytes.
The number of bytes per chunk that the Connector will download. The default chunk size is 1048576 bytes (~1.05 MB).
compressionHighThreshold
The maximum size that a file can be for the agent to compress it. The default value is 2147483647 bytes (~2.147 GB). If a file is larger than this size, the agent will not compress it.
Not applicable
requireOverallMD5
The value of this property answers the question: Should the agent calculate an MD5 checksum of the entire file? The default setting is false, which means that the Connector will not request the agent to calculate an MD5 checksum.
Not applicable
When you have completed setting the file transfer properties, save and close the configuration file. If you have not already done so, configure the TokenPropertyAuthenticator and set the environment variable before attempting to start the Connector.
Was this helpful?