core-java
core-java copied to clipboard
Posting commands with tenant ID to single-tenant BC
Spine 1.7.1
If you mistakenly create a command via ActorRequestFactory
with tenantId
that targets single-tenant BC.
And post this command directly to CommandService
via post(Command request, StreamObserver<Ack> responseObserver)
.
Response observer receives onCompleted
but the command is not delivered and leads to internal CommandErrored
that is not even logged.
Let's check this upon receiving the command. And fail fast in case of the tenancy mismatch.