How to call and get value from View in controller

i want to call view in my controller to check value present in value entity for that i am writing this code.

final CompletionStage<ReferenceDataDomain.ReferenceDataState> refDataView =    components().referenceDataView().getAllReferenceData(Any.newBuilder().build()).execute();
refDataView.toCompletableFuture().get(30, TimeUnit.SECONDS)//timeout at this place

But i am getting time out exception .Can some one please help what is the issue?

Yes, there is a bug with a future blocking call. A workaround and recommended way is to avoid blocking calls and use the Java Future and Kalix APIs to combine many processing stages, into an asyncReply:


Or simply forward in this case: