You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OF-3181: Allow static configuration of cluster node ID
Previously, an Openfire server generated a new cluster node ID on every startup, causing the identifier to change after each restart. This commit ensures that a server reuses the same node ID over time by persisting the initially generated value.
The node ID is now stored in `openfire.xml` under a new property: `clustering.nodeid`
- If the property does not exist at startup, a random node ID is generated and persisted.
- If the property exists, its value is reused.
This allows administrators to optionally define stable, human-recognizable node IDs. When doing so, administrators are responsible for ensuring uniqueness across all cluster members.
This change also removes the concept of a "default" node ID. Since Openfire 4.4.0 (OF-1705), node IDs no longer change when joining a cluster, making the distinction between default and runtime IDs obsolete. As a result, there is now a single node ID per server.
As a functional consequence, the node ID is no longer available until after server initialization (it is no longer a static field). This is expected to have little to no practical impact, as the previous static value was not publicly accessible.
* Returns the default node ID used by this server before clustering is
289
-
* initialized.
290
-
*
291
-
* @return The default node ID.
291
+
* @return The node ID.
292
+
* @deprecated use {@link #getNodeID()} instead. In versions of Openfire prior to 4.4.0, the cluster node identifier of a server was changed when a server joined a cluster. That's no longer the case: a cluster node now has a static identifier. As such, it's no longer needed to distinguish between the 'default' nodeID (which was used when no cluster was joind) and the cluster node ID.
292
293
*/
294
+
@Deprecated(forRemoval = true, since = "5.1.0") // Remove in or after Openfire 5.2.0.
0 commit comments