Hey everyone, me again,
Just having some issues with the LedgerConfigurationService. I’m trying to get the deduplication time of the ledger as below:
public void getLedgerConfiguration() {
try {
Flowable<LedgerConfigurationServiceOuterClass.LedgerConfiguration> configuration;
// Assume that ledgerConfigurationClient is already initialized using `damlLedgerClient.getLedgerConifigurationClient()
configuration = ledgerConfigurationClient.getLedgerConfiguration();
configuration.blockingForEach(
con -> {
LOGGER.info("LedgerConfiguration is {}", con);
});
LOGGER.info("Finished GetLedgerConfig");
} catch (Exception ex) {
LOGGER.error("Error returning ledger configuration {}", ex.getMessage());
}
}
Now, I’m simply logging the ledgerConfiguration, which works fine as below:
16:00:19.907 [main] INFO c.a.d.i.t.u.s.LedgerConfigurationService - LedgerConfiguration is max_deduplication_time {
seconds: 86400
}
However, it stalls after this and never returns. Now I understand that in a blockingForEach, it only terminates when: Note: the method will only return if the upstream terminates or the current thread is interrupted.. However, it seems like in this case, the upstream should terminate after returning the max_deduplication_time, which is currently the only returned field in the LedgerConfigurationService. I have tested this on the Sandbox, the Sandbox with static time, and DAML on VMWare.
Let me know if this is a bug, or if I’ve done something wrong in my implementation.
Thank you!