diff --git a/pom-maven-central.xml b/pom-maven-central.xml
index d0513d7f..e81bd2ec 100644
--- a/pom-maven-central.xml
+++ b/pom-maven-central.xml
@@ -7,7 +7,7 @@
kloadgen
- 5.6.9
+ 5.6.10
KLoadGen
Load Generation Jmeter plugin for Kafka Cluster. Supporting AVRO, JSON Schema and Protobuf schema types. Generate Artificial
diff --git a/pom.xml b/pom.xml
index fe0a95c2..48bf6fcd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
kloadgen
- 5.6.9
+ 5.6.10
KLoadGen
Load Generation Jmeter plugin for Kafka Cluster. Supporting AVRO, JSON Schema and Protobuf schema types. Generate Artificial
diff --git a/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementBeanInfo.java b/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementBeanInfo.java
index 8cfeae30..2a3b0aff 100644
--- a/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementBeanInfo.java
+++ b/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementBeanInfo.java
@@ -22,8 +22,8 @@ public SchemaRegistryConfigElementBeanInfo() {
super(SchemaRegistryConfigElement.class);
- createPropertyGroup("schema_registry_config", new String[]{SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_NAME,
- SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_PROPERTIES, SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_URL});
+ createPropertyGroup("schema_registry_config", new String[] {SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_NAME,
+ SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_URL, SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_PROPERTIES});
final PropertyDescriptor schemaRegistryName = property(SchemaRegistryConfigElementValue.SCHEMA_REGISTRY_NAME);
schemaRegistryName.setPropertyEditorClass(SchemaRegistryNamePropertyEditor.class);
diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java
index fdf8700c..445fd070 100644
--- a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java
+++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java
@@ -2,6 +2,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
import java.util.Properties;
import com.sngular.kloadgen.common.SchemaRegistryEnum;
@@ -32,20 +33,12 @@ private ExtractorFactory() {
public static ExtractorRegistry getExtractor(final String schemaType) {
if (schemaType != null && EnumUtils.isValidEnum(SchemaTypeEnum.class, schemaType.toUpperCase())) {
- final ExtractorRegistry response;
- switch (SchemaTypeEnum.valueOf(schemaType.toUpperCase())) {
- case JSON:
- response = JSON_EXTRACTOR;
- break;
- case AVRO:
- response = AVRO_EXTRACTOR;
- break;
- case PROTOBUF:
- response = PROTOBUFF_EXTRACTOR;
- break;
- default:
- throw new KLoadGenException(String.format("Schema type not supported %s", schemaType));
- }
+ final ExtractorRegistry response = switch (SchemaTypeEnum.valueOf(schemaType.toUpperCase())) {
+ case JSON -> JSON_EXTRACTOR;
+ case AVRO -> AVRO_EXTRACTOR;
+ case PROTOBUF -> PROTOBUFF_EXTRACTOR;
+ default -> throw new KLoadGenException(String.format("Schema type not supported %s", schemaType));
+ };
return response;
} else {
throw new KLoadGenException(String.format("Schema type not supported %s", schemaType));
@@ -63,12 +56,14 @@ public static Pair> flatPropertiesList(final Str
final SchemaRegistryEnum schemaRegistryEnum = SchemaRegistryEnum.valueOf(registryName.toUpperCase());
final Object schema;
- //TODO change parser
- schema = switch (schemaRegistryEnum) {
- case APICURIO -> ((ApicurioAbstractParsedSchemaMetadata) abstractParsedSchemaAdapter).getSchema();
- case CONFLUENT -> abstractParsedSchemaAdapter.getRawSchema();
- };
- attributeList.addAll(getExtractor(schemaType).processSchema(schema, schemaRegistryEnum));
+ if (Objects.nonNull(registryName)) {
+ //TODO change parser
+ schema = switch (schemaRegistryEnum) {
+ case APICURIO -> ((ApicurioAbstractParsedSchemaMetadata) abstractParsedSchemaAdapter).getSchema();
+ case CONFLUENT -> abstractParsedSchemaAdapter.getRawSchema();
+ };
+ attributeList.addAll(getExtractor(schemaType).processSchema(schema, schemaRegistryEnum));
+ }
return Pair.of(schemaType, attributeList);
}
}
\ No newline at end of file
diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java
index 32594da3..2db79a09 100644
--- a/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java
+++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java
@@ -12,11 +12,11 @@
public class AvroExtractor implements ExtractorRegistry