The RepublishEventsFromOfflineFile Tool
The RepublishEventsFromOfflineFile tool is a command-line recovery tool that imports events into a Universal Messaging realm server store (channel or queue) from any of the following sources:
An XML file or JSON file.
A copy of the store's persistent memory file (or multiple memory files for a multi-file store).
Event filtering can be applied while importing with the tool. Republishing is done as transaction event publishing.
Input files
Importing can be done from an XML or JSON file produced by the ExportEventsFromOfflineMemFile tool.
Importing can be done from offline memory files of the store taken from the parent realm's data directory. The offline memory files have the filetype *.mem. When importing multi-file stores, you specify the folder that contains the *.mem files. When importing a mixed/persistent store, you specify a single .mem file.
When you invoke the tool, you can specify either a mem file (or mem folder name), or an XML file, or a JSON file, but not a combination of these options.
The -protobufdescriptor input parameter
Import from the mem file of a protobuf store
If the import is performed from a protobuf store's mem file and the protobufdescriptor parameter specified is the same as for the "source" channel, then filtering can be done based on the protocol buffer event data.
If the "republish" channel has the same protocol buffer file descriptor set as the "source" store, events will be republished as protobuf events.
If the import is performed from a protobuf store's mem file and the protobufdescriptor parameter specified is the same as for the "source" channel, but the "republish" channel has another protocol buffer file descriptor or is not a protobuf channel, then event republishing will not be done.
If the import is performed from a protobuf store's mem file but the protobufdescriptor parameter is not specified, then filtering cannot be done based on protobuf data. Events will be republished as non-protobuf events to a non-protobuf store and to the protobuf store with a different (different from "source" store) protocol buffer file descriptor set. Events will be republished as protobuf events to the store with the same protocol buffer file descriptor set (the same as the "source" store has).
If the import is performed from a protobuf store's mem file but the protobufdescriptor specified is different for the "source" store and the same for "republish" store, events will be considered and republished as non-protobuf events.
Import from mem file of non-protobuf store
If the import is performed from a non-protobuf store's mem file and the protobufdescriptor parameter is not specified, events will be republished as non-protobuf events to any channel.
If the import is performed from a non-protobuf store's mem file and the protobufdescriptor parameter is specified and coincides with the descriptor of the "republish" channel, events will be republished as non-protobuf events.
But if the import is performed from a non-protobuf store's mem file and the protobufdescriptor parameter is specified and does not coincide with the descriptor of the "republish" channel, events will not be republished.
Import from XML and JSON files
If the source file belongs (was exported from) to a protobuf channel's mem file and was exported with its protobuf descriptor, the import will be done with the protobuf descriptor specified in the file. So it is possible to specify only a selector to filter events based on protobuf data. Events will be exported as protobuf events to the store with the same protobuf descriptor and as non-protobuf events to other channels.
If the source file belongs to a protobuf channel and was exported without a protobuf descriptor and no protobufdescriptor was specified or another is specified as input parameter, the import will be done without possible filtering based on the protobuf event data. Events will be exported as protobuf events to the store with the same protobuf descriptor as the "source" store had and as non-protobuf events to other channels. If the correct protobufdescriptor parameter is specified as an input parameter, then filtering will be possible based on protobuf eventdata.
The -batchsize input parameter
This parameter can be optionally specified when running the tool. It defines the number of events which will be read/loaded to the memory/ from mem/XML/JSON file, filtered and then published to the "destination" store as a single batch.
The default batch size is 100.