File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed
openmessaging-api-samples/src/main/java/io/openmessaging/samples
openmessaging-api/src/main/java/io/openmessaging/api Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff 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 *
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments