File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
daprdocs/content/en/java-sdk-docs Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -292,13 +292,16 @@ try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient())
292
292
// Get configuration for a single key
293
293
Mono<ConfigurationItem > item = client. getConfiguration(CONFIG_STORE_NAME , CONFIG_KEY ). block();
294
294
295
- // Get Configurations for multiple keys
296
- Mono<List< ConfigurationItem > > items =
295
+ // Get configurations for multiple keys
296
+ Mono<Map< String , ConfigurationItem > > items =
297
297
client. getConfiguration(CONFIG_STORE_NAME , CONFIG_KEY_1 , CONFIG_KEY_2 );
298
298
299
- // Susbcribe to Confifuration changes
300
- Flux<List< ConfigurationItem > > outFlux = client. subscribeToConfiguration (CONFIG_STORE_NAME , CONFIG_KEY_1 , CONFIG_KEY_2 );
299
+ // Subscribe to configuration changes
300
+ Flux<SubscribeConfigurationResponse > outFlux = client. subscribeConfiguration (CONFIG_STORE_NAME , CONFIG_KEY_1 , CONFIG_KEY_2 );
301
301
outFlux. subscribe(configItems - > configItems. forEach(... ));
302
+
303
+ // Unsubscribe from configuration changes
304
+ Mono<UnsubscribeConfigurationResponse > unsubscribe = client. unsubscribeConfiguration(SUBSCRIPTION_ID , CONFIG_STORE_NAME )
302
305
}
303
306
```
304
307
You can’t perform that action at this time.
0 commit comments