Skip to content

Commit a3fc681

Browse files
authored
Merge pull request #78 from dbl-x/feat_support_schema
rename config: openmeta_url to schema_registry_url
2 parents eda5910 + eda4350 commit a3fc681

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

openmessaging-api-samples/src/main/java/io/openmessaging/samples/consumer/GenericPushConsumerApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ public static void main(String[] args) {
3434
OMS.builder()
3535
.region("Shanghai")
3636
.endpoint("127.0.0.1:9876")
37+
.schemaRegistryUrl("http://localhost:1234")
3738
.driver("rocketmq")
3839
.withCredentials(new Properties())
3940
.build();
4041

4142
Properties properties = new Properties();
4243
properties.setProperty(OMSBuiltinKeys.DESERIALIZER, "io.openmessaging.openmeta.impl.Deserializer");
43-
properties.setProperty(OMSBuiltinKeys.OPEN_META_URL, "http://localhost:1234");
4444

4545
final Consumer consumer = messagingAccessPoint.createConsumer(properties);
4646
consumer.start();

openmessaging-api-samples/src/main/java/io/openmessaging/samples/producer/ProducerApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public static void main(String[] args) {
3535
OMS.builder()
3636
.region("shanghai,shenzhen")
3737
.endpoint("127.0.0.1:9876")
38+
.schemaRegistryUrl("http://localhost:1234")
3839
.driver("rocketmq")
3940
.withCredentials(new Properties())
4041
.build();
4142

4243
Properties properties = new Properties();
4344
properties.setProperty(OMSBuiltinKeys.SERIALIZER, "io.openmessaging.openmeta.impl.Serializer");
44-
properties.setProperty(OMSBuiltinKeys.OPEN_META_URL, "http://localhost:1234");
4545

4646
final Producer producer = messagingAccessPoint.createProducer(properties);
4747
producer.start();

openmessaging-api/src/main/java/io/openmessaging/api/OMS.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ public OMS endpoint(String endpoint) {
5757
return this;
5858
}
5959

60+
public OMS schemaRegistryUrl(String schemaRegistryUrl) {
61+
this.properties.put(OMSBuiltinKeys.SCHEMA_REGISTRY_URL, schemaRegistryUrl);
62+
return this;
63+
}
64+
6065
/**
6166
* Set the region provided by messaging vendor.
6267
*

openmessaging-api/src/main/java/io/openmessaging/api/OMSBuiltinKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ public interface OMSBuiltinKeys {
7373
/**
7474
* The {@code OPEN_META_URL} represents the OpenMeta(schema registry) server url.
7575
*/
76-
String OPEN_META_URL = "openMetaUrl";
76+
String SCHEMA_REGISTRY_URL = "schemaRegistryUrl";
7777

7878
}

0 commit comments

Comments
 (0)