Property ultra.file.move_timestamp_format can dyanamically added in custom mediation

Issue #24 invalid
Anonymous created an issue

Got quick question on property - ultra.file.move_timestamp_format. Is it compulsory we have to set something like - yyyy_MM_dd_'T'HH_mm_ss.SSSSZ, Can we not programmatic set in custom mediation?

Ok let me explain,I want to rename file as system generated UUID number for every success/fail files after file polled.

I tried as below but it is not working.

public void execute(Message msg, Mediation mediation) throws Exception {

String uuidString = getUUID(); ....... /// get data from file and send it to application


msg.addMessageProperty(FileConstants.MOVE_TIMESTAMP_FORMAT, uuidString)


Comments (2)

  1. Ruwan Linton

    What you really want is not the timestamp format, rather dynamically change the file name that goes out to the directory which can be done by using the following code in the mediation;

    String uuidString = getUUID();
    String receivedFileName = mediation.getFileSupport().getReceivedFileName();
    mediation.getFileSupport().setFileName(receivedFileName + "_" + uuidString);
  2. Log in to comment