Indexes may be rebuilt at times as a part of maintenance for the purpose of improving efficiency of fetch, repairing indexes, etc. The question asked is whether the operation can be done with or without Shareplex or its associated processes stopped.
There is no requirement of shutting down Shareplex or stopping its associated processes when rebuilding indexes. If one does want to put less stress on the system, one can stop Shareplex processes. On source it would be Capture and Read and on target it would be Post. However, one may want to remember to start the process(es) once the rebuilding is over. Another option one can use is the ONLINE option, the syntax of which is as follows:
ALTER INDEX <name> REBUILD ONLINE
The advantage offered by this option is DML lock-free online index rebuild, allowing transparent rebuild with no dependency on workload. Thus one can continue with replication when indexes are rebuilt using this option.