This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 2014427 Fixed camel-kafka doc that caused json schema to have invalid
escape char that json parser would fail parsing.
2014427 is described below
commit 2014427f275cc6a823dc92d94640401afef851f7
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Feb 22 05:56:03 2019 +0100
Fixed camel-kafka doc that caused json schema to have invalid escape char
that json parser would fail parsing.
---
.../org/apache/camel/catalog/CamelCatalogJsonSchemaTest.java | 12 ++++++++++++
components/camel-kafka/src/main/docs/kafka-component.adoc | 12 ++++++------
.../org/apache/camel/component/kafka/KafkaConfiguration.java | 11 +++++++----
.../kafka/springboot/KafkaComponentConfiguration.java | 9 +++++----
4 files changed, 30 insertions(+), 14 deletions(-)
diff --git
a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogJsonSchemaTest.java
b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogJsonSchemaTest.java
index 0ddf8d5..d05998f 100644
---
a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogJsonSchemaTest.java
+++
b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogJsonSchemaTest.java
@@ -19,18 +19,24 @@ package org.apache.camel.catalog;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class CamelCatalogJsonSchemaTest {
+ private static final Logger LOG =
LoggerFactory.getLogger(CamelCatalogJsonSchemaTest.class);
+
private CamelCatalog catalog = new DefaultCamelCatalog();
@Test
public void testValidateJsonComponent() throws Exception {
for (String name : catalog.findComponentNames()) {
String json = catalog.componentJSonSchema(name);
+ LOG.info("Validating {} component", name);
+ LOG.debug("with JSon: {}", json);
// validate we can parse the json
ObjectMapper mapper = new ObjectMapper();
@@ -47,6 +53,8 @@ public class CamelCatalogJsonSchemaTest {
public void testValidateJsonDataFormats() throws Exception {
for (String name : catalog.findDataFormatNames()) {
String json = catalog.dataFormatJSonSchema(name);
+ LOG.info("Validating {} dataformat", name);
+ LOG.debug("with JSon: {}", json);
// validate we can parse the json
ObjectMapper mapper = new ObjectMapper();
@@ -62,6 +70,8 @@ public class CamelCatalogJsonSchemaTest {
public void testValidateJsonLanguages() throws Exception {
for (String name : catalog.findLanguageNames()) {
String json = catalog.languageJSonSchema(name);
+ LOG.info("Validating {} language", name);
+ LOG.debug("with JSon: {}", json);
// validate we can parse the json
ObjectMapper mapper = new ObjectMapper();
@@ -77,6 +87,8 @@ public class CamelCatalogJsonSchemaTest {
public void testValidateJsonModels() throws Exception {
for (String name : catalog.findModelNames()) {
String json = catalog.modelJSonSchema(name);
+ LOG.info("Validating {} model", name);
+ LOG.debug("with JSon: {}", json);
// validate we can parse the json
ObjectMapper mapper = new ObjectMapper();
diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc
b/components/camel-kafka/src/main/docs/kafka-component.adoc
index 9770f02..4a3b510 100644
--- a/components/camel-kafka/src/main/docs/kafka-component.adoc
+++ b/components/camel-kafka/src/main/docs/kafka-component.adoc
@@ -82,7 +82,6 @@ with the following path and query parameters:
| *clientId* (common) | The client id is a user-specified string sent in each
request to help trace calls. It should logically identify the application
making the request. | | String
| *headerFilterStrategy* (common) | To use a custom HeaderFilterStrategy to
filter header to and from Camel message. | | HeaderFilterStrategy
| *reconnectBackoffMaxMs* (common) | The maximum amount of time in
milliseconds to wait when reconnecting to a broker that has repeatedly failed
to connect. If provided, the backoff per host will increase exponentially for
each consecutive connection failure, up to this maximum. After calculating the
backoff increase, 20% random jitter is added to avoid connection storms. | 1000
| Integer
-| *schemaRegistryURL* (common) | URL of the Confluent schema registry servers
to use. The format is host1:port1,host2:port2. This is known as
schema.registry.url in the Confluent documentation. | | String
| *allowManualCommit* (consumer) | Whether to allow doing manual commits via
KafkaManualCommit. If this option is enabled then an instance of
KafkaManualCommit is stored on the Exchange message header, which allows end
users to access this API and perform manual offset commits via the Kafka
consumer. | false | boolean
| *autoCommitEnable* (consumer) | If true, periodically commit to ZooKeeper
the offset of messages already fetched by the consumer. This committed offset
will be used when the process fails as the position from which the new consumer
will begin. | true | Boolean
| *autoCommitIntervalMs* (consumer) | The frequency in ms that the consumer
offsets are committed to zookeeper. | 5000 | Integer
@@ -150,7 +149,7 @@ with the following path and query parameters:
| *interceptorClasses* (monitoring) | Sets interceptors for producer or
consumers. Producer interceptors have to be classes implementing
org.apache.kafka.clients.producer.ProducerInterceptor Consumer interceptors
have to be classes implementing
org.apache.kafka.clients.consumer.ConsumerInterceptor Note that if you use
Producer interceptor on a consumer it will throw a class cast exception in
runtime | | String
| *kerberosBeforeReloginMin Time* (security) | Login thread sleep time between
refresh attempts. | 60000 | Integer
| *kerberosInitCmd* (security) | Kerberos kinit command path. Default is
/usr/bin/kinit | /usr/bin/kinit | String
-| *kerberosPrincipalToLocal Rules* (security) | A list of rules for mapping
from principal names to short names (typically operating system usernames). The
rules are evaluated in order and the first rule that matches a principal name
is used to map it to a short name. Any later rules in the list are ignored. By
default, principal names of the form {username}/{hostname}{REALM} are mapped to
{username}. For more details on the format please see a href=\#security_authz\
security authorizati [...]
+| *kerberosPrincipalToLocal Rules* (security) | A list of rules for mapping
from principal names to short names (typically operating system usernames). The
rules are evaluated in order and the first rule that matches a principal name
is used to map it to a short name. Any later rules in the list are ignored. By
default, principal names of the form {username}/{hostname}{REALM} are mapped to
{username}. For more details on the format please see the security
authorization and acls documenta [...]
| *kerberosRenewJitter* (security) | Percentage of random jitter added to the
renewal time. | 0.05 | Double
| *kerberosRenewWindowFactor* (security) | Login thread will sleep until the
specified window factor of time from last refresh to ticket's expiry has been
reached, at which time it will try to renew the ticket. | 0.8 | Double
| *saslJaasConfig* (security) | Expose the kafka sasl.jaas.config parameter
Example: org.apache.kafka.common.security.plain.PlainLoginModule required
username=USERNAME password=PASSWORD; | | String
@@ -162,16 +161,17 @@ with the following path and query parameters:
| *sslEnabledProtocols* (security) | The list of protocols enabled for SSL
connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default. |
TLSv1.2,TLSv1.1,TLSv1 | String
| *sslEndpointAlgorithm* (security) | The endpoint identification algorithm to
validate server hostname using server certificate. | | String
| *sslKeymanagerAlgorithm* (security) | The algorithm used by key manager
factory for SSL connections. Default value is the key manager factory algorithm
configured for the Java Virtual Machine. | SunX509 | String
-| *sslKeyPassword* (security) | The password of the private key in the key
store file. This is optional for client. | | String
-| *sslKeystoreLocation* (security) | The location of the key store file. This
is optional for client and can be used for two-way authentication for client. |
| String
-| *sslKeystorePassword* (security) | The store password for the key store
file.This is optional for client and only needed if ssl.keystore.location is
configured. | | String
| *sslKeystoreType* (security) | The file format of the key store file. This
is optional for client. Default value is JKS | JKS | String
| *sslProtocol* (security) | The SSL protocol used to generate the SSLContext.
Default setting is TLS, which is fine for most cases. Allowed values in recent
JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in
older JVMs, but their usage is discouraged due to known security
vulnerabilities. | TLS | String
| *sslProvider* (security) | The name of the security provider used for SSL
connections. Default value is the default security provider of the JVM. | |
String
| *sslTrustmanagerAlgorithm* (security) | The algorithm used by trust manager
factory for SSL connections. Default value is the trust manager factory
algorithm configured for the Java Virtual Machine. | PKIX | String
+| *sslTruststoreType* (security) | The file format of the trust store file.
Default value is JKS. | JKS | String
+| *schemaRegistryURL* (confluent) | URL of the Confluent schema registry
servers to use. The format is host1:port1,host2:port2. This is known as
schema.registry.url in the Confluent documentation. This option is only
available in the Confluent Kafka product (not standard Apache Kafka) | | String
+| *sslKeyPassword* (security) | The password of the private key in the key
store file. This is optional for client. | | String
+| *sslKeystoreLocation* (security) | The location of the key store file. This
is optional for client and can be used for two-way authentication for client. |
| String
+| *sslKeystorePassword* (security) | The store password for the key store
file.This is optional for client and only needed if ssl.keystore.location is
configured. | | String
| *sslTruststoreLocation* (security) | The location of the trust store file. |
| String
| *sslTruststorePassword* (security) | The password for the trust store file.
| | String
-| *sslTruststoreType* (security) | The file format of the trust store file.
Default value is JKS. | JKS | String
|===
// endpoint options: END
// spring-boot-auto-configure options: START
diff --git
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
index 5b82a82..4c6049c 100644
---
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
+++
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
@@ -58,8 +58,6 @@ public class KafkaConfiguration implements Cloneable,
HeaderFilterStrategyAware
@UriParam(label = "common")
private String brokers;
@UriParam(label = "common")
- private String schemaRegistryURL;
- @UriParam(label = "common")
private String clientId;
@UriParam(label = "common", description = "To use a custom
HeaderFilterStrategy to filter header to and from Camel message.")
private HeaderFilterStrategy headerFilterStrategy = new
KafkaHeaderFilterStrategy();
@@ -315,6 +313,10 @@ public class KafkaConfiguration implements Cloneable,
HeaderFilterStrategyAware
// sasl.jaas.config
private String saslJaasConfig;
+ // Confluent only options
+ @UriParam(label = "confluent")
+ private String schemaRegistryURL;
+
public KafkaConfiguration() {
}
@@ -805,6 +807,8 @@ public class KafkaConfiguration implements Cloneable,
HeaderFilterStrategyAware
* URL of the Confluent schema registry servers to use.
* The format is host1:port1,host2:port2.
* This is known as schema.registry.url in the Confluent documentation.
+ * <p/>
+ * This option is only available in the Confluent Kafka product (not
standard Apache Kafka)
*/
public void setSchemaRegistryURL(String schemaRegistryURL) {
this.schemaRegistryURL = schemaRegistryURL;
@@ -952,8 +956,7 @@ public class KafkaConfiguration implements Cloneable,
HeaderFilterStrategyAware
* and the first rule that matches a principal name is used to map it to a
* short name. Any later rules in the list are ignored. By default,
* principal names of the form {username}/{hostname}@{REALM} are mapped to
- * {username}. For more details on the format please see <a
- * href=\"#security_authz\"> security authorization and acls</a>.
+ * {username}. For more details on the format please see the security
authorization and acls documentation..
* <p/>
* Multiple values can be separated by comma
*/
diff --git
a/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
b/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
index c5536e7..8145b7d 100644
---
a/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
+++
b/platforms/spring-boot/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
@@ -307,7 +307,8 @@ public class KafkaComponentConfiguration
/**
* URL of the Confluent schema registry servers to use. The format is
* host1:port1,host2:port2. This is known as schema.registry.url in the
- * Confluent documentation.
+ * Confluent documentation. This option is only available in the
+ * Confluent Kafka product (not standard Apache Kafka)
*/
private String schemaRegistryURL;
/**
@@ -372,9 +373,9 @@ public class KafkaComponentConfiguration
* order and the first rule that matches a principal name is used to
map
* it to a short name. Any later rules in the list are ignored. By
* default, principal names of the form {username}/{hostname}{REALM}
are
- * mapped to {username}. For more details on the format please see a
- * href=\#security_authz\ security authorization and acls. Multiple
- * values can be separated by comma
+ * mapped to {username}. For more details on the format please see the
+ * security authorization and acls documentation.. Multiple values can
+ * be separated by comma
*/
private String kerberosPrincipalToLocalRules = "DEFAULT";
/**