JiriOndrusek commented on code in PR #24405:
URL: https://github.com/apache/camel/pull/24405#discussion_r3534221875


##########
components/camel-ai/camel-weaviate/src/main/java/org/apache/camel/component/weaviate/WeaviateVectorDbConfiguration.java:
##########
@@ -29,29 +29,42 @@ public class WeaviateVectorDbConfiguration implements 
Cloneable {
 
     @Metadata(label = "producer",
               description = "Scheme used to connect to weaviate")
-    @UriParam
-    private String scheme;
+    @UriParam(defaultValue = "http")
+    private String scheme = "http";
 
     @Metadata(label = "producer",
               description = "Weaviate server host to connect to")
     @UriParam
     private String host;
 
+    @Deprecated
     @Metadata(label = "producer",
               description = "Proxy host to connect to weaviate through")
     @UriParam
     private String proxyHost;
 
+    @Deprecated
     @Metadata(label = "producer",
               description = "Proxy port to connect to weaviate through")

Review Comment:
   Applied — initialized `grpcPort = 50051` at the field level, consistent with 
`scheme`. Also simplified the null-check fallback in `createClient()` since the 
field is now always initialized.
   
   _Claude Code on behalf of Jiri Ondrusek_



##########
components/camel-ai/camel-weaviate/pom.xml:
##########
@@ -52,10 +52,12 @@
             <version>${langchain4j-version}</version>
         </dependency>
 
+        <!-- classifier=all is required: without it, gRPC's ServiceLoader 
breaks in fat JARs -->
         <dependency>
             <groupId>io.weaviate</groupId>
-            <artifactId>client</artifactId>
+            <artifactId>client6</artifactId>

Review Comment:
   Good question. I inspected the `client6-6.x-all.jar` — it bundles 
dependencies (Guava, Gson, HttpClient 5, commons-lang3, nimbus-jose-jwt) 
without relocation, but notably does NOT include gRPC or Netty classes. The 
gRPC dependency comes from the regular POM transitive chain. The full reactor 
build passes without classpath conflicts. Worth monitoring if future Camel 
components overlap on bundled versions, but no issues observed currently.
   
   _Claude Code on behalf of Jiri Ondrusek_



##########
components/camel-ai/camel-weaviate/src/main/java/org/apache/camel/component/weaviate/WeaviateVectorDbConfiguration.java:
##########
@@ -29,29 +29,42 @@ public class WeaviateVectorDbConfiguration implements 
Cloneable {
 
     @Metadata(label = "producer",
               description = "Scheme used to connect to weaviate")
-    @UriParam
-    private String scheme;
+    @UriParam(defaultValue = "http")
+    private String scheme = "http";
 
     @Metadata(label = "producer",
               description = "Weaviate server host to connect to")
     @UriParam
     private String host;
 
+    @Deprecated
     @Metadata(label = "producer",
               description = "Proxy host to connect to weaviate through")
     @UriParam
     private String proxyHost;
 
+    @Deprecated
     @Metadata(label = "producer",
               description = "Proxy port to connect to weaviate through")
     @UriParam
     private Integer proxyPort;
 
+    @Deprecated
     @Metadata(label = "producer",
               description = "Proxy scheme to connect to weaviate through")
     @UriParam
     private String proxyScheme;
 
+    @Metadata(label = "producer",
+              description = "gRPC host for Weaviate server connection")
+    @UriParam
+    private String grpcHost;
+
+    @Metadata(label = "producer",
+              description = "gRPC port for Weaviate server connection", 
defaultValue = "50051")
+    @UriParam(defaultValue = "50051")

Review Comment:
   Applied — initialized `grpcPort = 50051` at the field level, matching the 
pattern used for `scheme`. The null-check in `createClient()` has been 
simplified accordingly.
   
   _Claude Code on behalf of Jiri Ondrusek_



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc:
##########
@@ -94,3 +94,63 @@ payloads, enable stream caching on the route.
 
 * The `bufferSize` option has been removed. It only configured the previous 
streaming implementation and no longer has
 any effect with authenticated encryption.
+
+=== camel-weaviate - potential breaking change
+
+The Weaviate Java client has been upgraded from v5 (`io.weaviate:client`) to 
v6 (`io.weaviate:client6`).
+This is a major upgrade with several breaking changes.
+
+==== Scheme default value
+
+The `scheme` endpoint option now defaults to `http`. Previously it had no 
default. Routes that relied on the old
+behavior (passing no scheme) should explicitly set `scheme=http` or 
`scheme=https` as appropriate.
+
+==== Collection name case sensitivity
+
+Weaviate v6 requires collection names to start with an uppercase letter 
(PascalCase). Existing routes using lowercase
+collection names (e.g., `weaviate:myCollection`) must be updated to use 
PascalCase (e.g., `weaviate:MyCollection`).
+
+==== New gRPC configuration options
+
+The v6 client requires a gRPC connection in addition to the HTTP connection.
+Two new endpoint options have been added: `grpcHost` (defaults to the HTTP 
host) and `grpcPort` (defaults to `50051`).
+When connecting to a Weaviate server that exposes gRPC on a non-default host 
or port, these options must be set explicitly.
+
+==== Response body types changed
+
+The exchange body returned by the producer no longer uses 
`io.weaviate.client.base.Result<T>` wrappers.
+Code that casts the response body must be updated:
+
+[cols="1,2,2", options="header"]
+|===
+| Action | Old body type | New body type
+
+| `CREATE_COLLECTION` | `Result<Boolean>` | `Boolean`
+| `CREATE` | `Result<WeaviateObject>` | `WeaviateObject<Map<String, Object>>`
+| `UPDATE_BY_ID` | `Result<Boolean>` | `Boolean`
+| `DELETE_BY_ID` | `Result<Boolean>` | `Boolean`
+| `DELETE_COLLECTION` | `Result<Boolean>` | `Boolean`
+| `QUERY` | `Result<GraphQLResponse>` | `QueryResponse<Map<String, Object>>`
+| `QUERY_BY_ID` | `Result<List<WeaviateObject>>` | 
`Optional<WeaviateObject<Map<String, Object>>>`
+|===
+
+The `WeaviateObject` class has also moved from 
`io.weaviate.client.v1.data.model` to `io.weaviate.client6.v1.api.collections`
+and uses accessor methods (`uuid()`, `properties()`) instead of getter methods 
(`getId()`, `getProperties()`).
+
+==== Client type changed
+
+The autowired client type has changed from `io.weaviate.client.WeaviateClient` 
to `io.weaviate.client6.v1.api.WeaviateClient`.
+Routes that inject a custom `WeaviateClient` instance must update the import 
and construction to use the v6 API
+(e.g., `WeaviateClient.connectToCustom(...)` instead of `new 
WeaviateClient(config)`).
+
+==== Readiness check removed
+
+The v5 client performed a readiness check (`misc().readyChecker()`) during 
client creation and threw an exception
+if the Weaviate server was not ready. The v6 client no longer performs this 
check at startup. Errors will now
+surface on the first operation instead of during endpoint initialization.
+
+==== Proxy configuration deprecated
+
+The v6 client no longer supports HTTP proxy configuration.
+The `proxyHost`, `proxyPort`, and `proxyScheme` endpoint options are 
deprecated and have no effect.
+They will be removed in a future release.

Review Comment:
   Agreed — removed the proxy fields (`proxyHost`, `proxyPort`, `proxyScheme`) 
entirely instead of deprecating them, since they have no effect with the v6 
client. Updated the upgrade guide, tests, and regenerated downstream artifacts 
accordingly.
   
   _Claude Code on behalf of Jiri Ondrusek_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to