  Dynamical ensembles have been introduced to study constrained stochastic
processes. In the microcanonical ensemble, the value of a dynamical observable
is constrained to a given value. In the canonical ensemble a bias is introduced
in the process to move the mean value of this observable. The equivalence
between the two ensembles means that calculations in one or the other ensemble
lead to the same result. In this paper, we study the physical conditions
associated with ensemble equivalence and the consequences of non-equivalence.
For continuous time Markov jump processes, we show that ergodicity guarantees
ensemble equivalence. For non-ergodic systems or systems with emergent
ergodicity breaking, we adapt a method developed for equilibrium ensembles to
compute asymptotic probabilities while caring about the initial condition. We
illustrate our results on the infinite range Ising model by characterizing the
fluctuations of magnetization and activity. We discuss the emergence of non
ergodicity by showing that the initial condition can only be forgotten after a
time that scales exponentially with the number of spins.
