1919
2020import java .util .Properties ;
2121
22- import io .confluent .kafka .schemaregistry .avro . AvroCompatibilityLevel ;
22+ import io .confluent .kafka .schemaregistry .CompatibilityLevel ;
2323import io .confluent .kafka .schemaregistry .client .rest .RestService ;
2424import io .confluent .kafka .schemaregistry .exceptions .SchemaRegistryException ;
2525import io .confluent .kafka .schemaregistry .rest .SchemaRegistryConfig ;
@@ -37,38 +37,28 @@ public class RestApp {
3737 public Server restServer ;
3838 public String restConnect ;
3939
40- public RestApp (int port , String zkConnect , String kafkaTopic ) {
41- this (port , zkConnect , kafkaTopic , AvroCompatibilityLevel .NONE .name , null );
40+ public RestApp (String zkConnect , String kafkaTopic ) {
41+ this (zkConnect , kafkaTopic , CompatibilityLevel .NONE .name , null );
4242 }
4343
4444 public RestApp (
45- int port ,
4645 String zkConnect ,
4746 String kafkaTopic ,
4847 String compatibilityType ,
4948 Properties schemaRegistryProps ) {
50- this (port , zkConnect , null , kafkaTopic , compatibilityType , true , schemaRegistryProps );
49+ this (zkConnect , null , kafkaTopic , compatibilityType , true , schemaRegistryProps );
5150 }
5251
5352 public RestApp (
54- int port ,
5553 String zkConnect ,
5654 String kafkaTopic ,
5755 String compatibilityType ,
5856 boolean masterEligibility ,
5957 Properties schemaRegistryProps ) {
60- this (
61- port ,
62- zkConnect ,
63- null ,
64- kafkaTopic ,
65- compatibilityType ,
66- masterEligibility ,
67- schemaRegistryProps );
58+ this (zkConnect , null , kafkaTopic , compatibilityType , masterEligibility , schemaRegistryProps );
6859 }
6960
7061 public RestApp (
71- int port ,
7262 String zkConnect ,
7363 String bootstrapBrokers ,
7464 String kafkaTopic ,
@@ -79,15 +69,14 @@ public RestApp(
7969 if (schemaRegistryProps != null ) {
8070 prop .putAll (schemaRegistryProps );
8171 }
82- prop .setProperty (SchemaRegistryConfig .PORT_CONFIG , ((Integer ) port ).toString ());
8372 if (zkConnect != null ) {
8473 prop .setProperty (SchemaRegistryConfig .KAFKASTORE_CONNECTION_URL_CONFIG , zkConnect );
8574 }
8675 if (bootstrapBrokers != null ) {
8776 prop .setProperty (SchemaRegistryConfig .KAFKASTORE_BOOTSTRAP_SERVERS_CONFIG , bootstrapBrokers );
8877 }
8978 prop .put (SchemaRegistryConfig .KAFKASTORE_TOPIC_CONFIG , kafkaTopic );
90- prop .put (SchemaRegistryConfig .COMPATIBILITY_CONFIG , compatibilityType );
79+ prop .put (SchemaRegistryConfig .SCHEMA_COMPATIBILITY_CONFIG , compatibilityType );
9180 prop .put (SchemaRegistryConfig .MASTER_ELIGIBILITY , masterEligibility );
9281 }
9382
0 commit comments