Question

We have a corp node and many store nodes for file sync. We have sync files from each store nodes to corp node. The source directory be different in different stores.

Can we change the base dir of a file trigger dynamic using something like bean shell script or any extension. i.e. the source base directory of a file trigger will be different in different stores.

Was it helpful?

Solution

The source base directory is specified on the node group. Since it's a source setting it can't be changed like the target settings can be.

There are two possible solutions...

  1. Create a separate node group for each client. Clients that share the same base directory can obviously share the same node group.
  2. You can use transforms to modify the configuration as its sent to the client. This is a hack, so try it at your own risk. You would create a BSH or a lookup transform on the sym_file_trigger table. You could look up the base directory from a table using the client node id. I have used this approach for different parts of SymmetricDS but never on file sync.

This seems like a common situation. I created a feature request as part of the 3.6 release. We should have a cleaner solution for you in the next few months. You can track the issue here...

http://www.symmetricds.org/issues/view.php?id=1623

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top