Skip to content

Commit

Permalink
fix: numberOfVerticles > 1 lead to transaction exclusion failed to st…
Browse files Browse the repository at this point in the history
…art issue
  • Loading branch information
jonesho committed Oct 14, 2024
1 parent f75cc83 commit d227ddf
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,20 @@ class Api(
configs.observabilityPort
)
)
val httpServer = HttpJsonRpcServer(configs.port.toUInt(), configs.path, HttpRequestHandler(messageHandler))
var httpServer: HttpJsonRpcServer? = null
return vertx
.deployVerticle(
httpServer,
{
HttpJsonRpcServer(configs.port.toUInt(), configs.path, HttpRequestHandler(messageHandler))
.also {
httpServer = it
}
},
DeploymentOptions().setInstances(numberOfVerticles)
)
.compose { verticleId: String ->
jsonRpcServerId = verticleId
serverPort = httpServer.bindedPort
serverPort = httpServer!!.bindedPort
vertx.deployVerticle(observabilityServer).onSuccess { monitorVerticleId ->
this.observabilityServerId = monitorVerticleId
}
Expand Down

0 comments on commit d227ddf

Please sign in to comment.