Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

API Method - ReceiverAddDynamicFileConfig

This method is used to control the file creation event for a Receiver. 

Example: A Receiver can be configured to generate a new file after every 100 records get generated.

Note:

This will only work for Receivers that have dynamic configuration enabled.

Exceptions

The following GenRocket exceptions may be thrown by this method:

  • If the requested domainName is not found.
  • If the requested receiverName is not found.
  • If the requested fileConfig is not found

Runtime Method Signature

Use this method signature when directly accessing the GenRocket binary runtime.

public void receiverAddDynamicFileConfig(String domainName, String receiverName, Map<String, Object> fileConfig)

For example, to create a new file after every 30 records get generated, configure the file creation event for DelimitedFileReceiver of Customer Domain as:

Map fileConfig = [ 
    fileConfigEventName : "Constant", fileConfigEventParameters: ["count": 30]
]

engineManual.receiverAddDynamicFileConfig("Customer", "DelimitedFileReceiver", fileConfig)

REST/Socket Payload Request

Use this API JSON request payload when making an API call to the GenRocket REST or Socket Engine.

{
  "methodName": "receiverAddDynamicFileConfig",
   "parameters": {
   "domainName": "Customer",
   "receiverName": "DelimitedFileReceiver",
   "fileConfig": {
        "fileConfigEventName": "Constant",
        "fileConfigEventParameters": {
            "count" : 30
        }
     }
   }
}

REST/Socket Payload Successful Payload Response

The API JSON response payload for this method will be empty.

{
  "responseType": "OK",
  "data": ""
}