Skip to content

Saved Request Response Messages

Tamás Kőhegyi edited this page Dec 14, 2015 · 4 revisions

Naming Convention for the Logged Messages

Both request and response HEADER and BODY is logged as plain text, 1 file per message.

File names are:

  • Requests: [FI][instancePrefix_]<timestamp>.<id>req[_customPostfix].txt
  • Responses: [FI][instancePrefix_]<timestamp>.<id>resp[_customPostfix].txt

Examples:

  • Default settings, a request: 20151214195415.0000req.txt
  • With Wilma instance prefix, a response: instanceA_20151214195415.0000resp.txt
  • A response with custom postfix that adds the type of the message: 20151214195415.0000resp_JSON.txt

Where

  • timestamp: YYYYMMDDHHNNSS
  • id is nnnn, starting from 0000 for every second, and a request-response pairs have the same. The length of this field is always 4 digit, except when the number of messages per second is over 9999, that is very unlikely. These parts are generated by the proxy part of Wilma.
  • FI part is optionally added to the front of the message by Wilma, only when the message content is fastinfoset, and its decompression was failed.
  • instancePrefix part is used to identify the Wilma instance when more than one Wilma instances are storing messages to the same folder. This part is coming from the config parameter wilma.instance.prefix. By default it is empty. Available in Wilma version >=1.4.x.
  • customePostfix part can be set by using interceptors, and calling the setWilmaMessageCustomPostfix method for the request and/or the response messages. By default it is empty. Available in Wilma version >=1.4.x.

Message target folder is defined in the property file (default: ./messages) If the specified folder does not exist, Wilma will create it.

Message Clean-up

To avoid "no disk space left on device" problem, Wilma deletes the old request/response files automatically. Selectable methods (configurable, only one of them can be selected):

  • (a) timelimit: delete files that is older than a certain limit (like xH hours, xD days, not mixed, either hour (H) or day (D) can be specified)
  • (b) filelimit: delete the old ones if number of written files reached a certain limit (for ex: 1000)

When Wilma application starts, a message is written to the console, which method is used with what parameters.

Clone this wiki locally