|
1 | 1 | // Copyright (c) Microsoft Corporation. All Rights reserved
|
2 | 2 | // Licensed under the MIT license.
|
3 | 3 |
|
| 4 | +// cspell:ignore geodr georeplication |
| 5 | + |
4 | 6 | use super::{
|
5 | 7 | claims_based_security::RecoverableClaimsBasedSecurity, management::RecoverableManagementClient,
|
6 | 8 | receiver::RecoverableReceiver, sender::RecoverableSender,
|
@@ -31,6 +33,12 @@ use std::{
|
31 | 33 | };
|
32 | 34 | use tracing::{debug, span, trace, warn};
|
33 | 35 |
|
| 36 | +/// The AMQP capability string used to negotiate geographic replication features |
| 37 | +/// between client and server. This capability is advertised during AMQP connection setup to indicate |
| 38 | +/// support for geographic replication, allowing clients and Event Hubs to coordinate failover and replication |
| 39 | +/// scenarios for high availability. |
| 40 | +const GEODR_REPLICATION_CAPABILITY: &str = "com.microsoft.georeplication"; |
| 41 | + |
34 | 42 | /// The recoverable connection is responsible for managing the connection to the Event Hubs service.
|
35 | 43 | /// It also handles authorization and connection recovery.
|
36 | 44 | ///
|
@@ -292,6 +300,7 @@ impl RecoverableConnection {
|
292 | 300 | .map(|(k, v)| (AmqpSymbol::from(k), AmqpValue::from(v)))
|
293 | 301 | .collect(),
|
294 | 302 | ),
|
| 303 | + desired_capabilities: Some(vec![GEODR_REPLICATION_CAPABILITY.into()]), |
295 | 304 | custom_endpoint: self.custom_endpoint.clone(),
|
296 | 305 | ..Default::default()
|
297 | 306 | }),
|
|
0 commit comments