@@ -10,6 +10,31 @@ Migrating from the HLRC therefore requires some code rewrite in your
10
10
application. This transition can however happen progressively as the two client
11
11
libraries can coexist in a single application with no operational overhead.
12
12
13
+ [discrete]
14
+ === Compatibility mode: using a 7.17 client with {es} 8.x
15
+ The HLRC version `7.17` can be used with {es} version `8.x` by enabling
16
+ HLRC's compatibility mode (see code sample below). In this mode HLRC sends
17
+ additional headers that instruct {es} `8.x` to behave like a `7.x` server.
18
+
19
+ The {java-client} doesn't need this setting as compatibility mode is always
20
+ enabled.
21
+
22
+ [discrete]
23
+ === Using the same http client with the HLRC and the Java API Client
24
+
25
+ To avoid any operational overhead during the transition phase where an
26
+ application would use both the HLRC and the new Java API Client, both clients
27
+ can share the same Low Level Rest Client, which is the network layer that
28
+ manages all connections, round-robin strategies, node sniffing, and so on.
29
+
30
+ The code below shows how to initialize both clients with the same HTTP client:
31
+
32
+ ["source","java"]
33
+ --------------------------------------------------
34
+ include-tagged::{doc-tests}/MigrateHlrcTest.java[migrate]
35
+ --------------------------------------------------
36
+ <1> Enables compatibility mode that allows HLRC `7.17` to work with {es} `8.x`.
37
+
13
38
[discrete]
14
39
=== Transition strategies
15
40
@@ -26,18 +51,3 @@ For example:
26
51
leveraging the tight integration of the new Java API Client with JSON object
27
52
mappers.
28
53
29
-
30
- [discrete]
31
- === Using the same transport with the HLRC and the Java API Client
32
-
33
- To avoid any operational overhead during the transition phase where an
34
- application would use both the HLRC and the new Java API Client, both clients
35
- can share the same Low Level Rest Client, which is the network layer that
36
- manages all connections, round-robin strategies, node sniffing, and so on.
37
-
38
- The code below shows how to initialize both clients with the same HTTP client:
39
-
40
- ["source","java"]
41
- --------------------------------------------------
42
- include-tagged::{doc-tests}/MigrateHlrcTest.java[migrate]
43
- --------------------------------------------------
0 commit comments