Hi,
I start a Zeebe workflow instance and do workflow correlation from behind a service with a rest api.
How expensive is the ZeebeClient.newClientBuilder operation if this is done for each message correlation in a process - for example as the code below?
Regards,
Ken
private void sendEvent(String messageName, String orderId) {
try {
final ZeebeClient client = ZeebeClient.newClientBuilder()
// change the contact point if needed
.gatewayAddress("127.0.0.1:26500")
.usePlaintext()
.build();
Duration timeToLive = Duration.ofMinutes(60L);
client.newPublishMessageCommand().
messageName(messageName).
correlationKey(orderId).
timeToLive(timeToLive).
send().
join();
}catch (Exception e){
logger.error("", e);
}
}