Skip to content

Commit 146e32e

Browse files
committed
Transport docs
1 parent a81fc00 commit 146e32e

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

docs/reference/transport/index.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
# HTTP transport
1+
---
2+
navigation_title: Transport layer
3+
---
4+
5+
# The transport layer
6+
7+
`ElasticsearchClient` exposes the Elasticsearch APIs using high level objects and data structures. It relies on a `Transport` implementation for lower level concerns that include:
8+
9+
* JSON serialization and deserialization, by delegating to a `JsonpMapper`.
10+
* network communication: HTTP, TLS, load-balancing among cluster nodes, etc.
11+
12+
## JSON mappers
13+
14+
The Java API client comes with two JSON mapping implementations:
15+
16+
* `JacksonJsonpMapper`, the default implementation based on the popular [Jackson](https://github.com/FasterXML/jackson) library.
17+
* `JsonbJsonpMapper`, based on the JakartaEE JSONP specification, which allows using any implementation of this specification such as [Eclipse Parsson](https://github.com/eclipse-ee4j/parsson)
18+
19+
Which implementation should you use?
20+
21+
Unless you have specific requirements, use the default Jackson implementation.
22+
23+
## HTTP implementations
24+
25+
The Java API client comes with two HTTP implementations:
26+
27+
* [](rest5-client/index.md), the default implementation, based on the Apache http client library version 5. It's a direct port of the previous version to this new library.
28+
* [Rest Client](rest-client/index.md), the legacy implementation that has existed since Elasticsearch version 7, based on the Apache http client library version 4.
29+
30+
Which implementation should you use?
31+
* if you're starting a new application, use the default Rest 5 Client.
32+
* if you're upgrading an existing application, consider upgrading to Rest 5 Client. Adapting your client creation code to the newer Apache http library should be releatively straightforward.
33+
* if you're upgrading an application with a heavily customized Rest Client configuration, then consider staying with this legacy version. Be mindful however that it may be removed in the next major release.

0 commit comments

Comments
 (0)