Zeebe broker will go wrong when publish a msg with wrong msg correlationkey

BPMN

step1:
payload := map[string]interface{}{“user”:“zeebe0”,“level”:“high”}
zbClient.NewCreateInstanceCommand().BPMNProcessId(“my bpmn process id”).LatestVersion().PayloadFromMap(payload).Send()

step2:
zbClient.NewPublishMessageCommand().MessageName(“handle”).CorrelationKey(“zeebe”).PayloadFromMap(otherPayload).Send()
(I give a wrong CorrelationKey(“zeebe”) where need CorrelationKey(“zeebe0”) ~~~)

after step2, zeebe broker go wrong, and error log:
17:38:55.001 [zb-stream-processor] [0.0.0.0:26501-zb-actors-0] ERROR io.zeebe.logstreams - Stream processor ‘zb-stream-processor’ failed to process event. It stop processing further events.
java.lang.IllegalStateException: Expected to find subscription with key 3458764513820540966, but no subscription found
at io.zeebe.broker.subscription.message.state.MessageSubscriptionState.lambda$visitSubscriptions$0(MessageSubscriptionState.java:216) ~[zeebe-broker-core-0.14.0.jar:0.14.0]
at io.zeebe.logstreams.rocksdb.ZbRocksDb.forEachPrefixed(ZbRocksDb.java:277) ~[zb-logstreams-0.14.0.jar:0.14.0]
at io.zeebe.broker.subscription.message.state.MessageSubscriptionState.visitSubscriptions(MessageSubscriptionState.java:206) ~[zeebe-broker-core-0.14.0.jar:0.14.0]
at io.zeebe.broker.subscription.message.processor.PublishMessageProcessor.handleNewMessage(PublishMessageProcessor.java:98) ~[zeebe-broker-core-0.14.0.jar:0.14.0]
at io.zeebe.broker.subscription.message.processor.PublishMessageProcessor.processRecord(PublishMessageProcessor.java:82) ~[zeebe-broker-core-0.14.0.jar:0.14.0]
at io.zeebe.broker.logstreams.processor.TypedRecordProcessor.processRecord(TypedRecordProcessor.java:56) ~[zeebe-broker-core-0.14.0.jar:0.14.0]

Thanks for reporting this.

Could you please upload the bpmn file ?
Is this problem reproducable with the given code snippets?
We will try to investigate this in the beginning of next week.

Greets Chris

Is this problem reproducable with the given code snippets?
===> Yes

bpmn file : complex.bpmn
go client : complex.go

step 0:
go run complex.go

step 1:
curl -s -d ‘{“user”:“zeebe1”,“level”:“high”}’ ‘http://localhost:28000/new

step 2:
curl -s -d ‘{“user”:“zeebe1”,“level”:“low”}’ ‘http://localhost:28000/new

step 3:
curl -s -d ‘{“msg”:“send a msg, now”}’ ‘http://localhost:28000/message?name=handle&key=zeebe

after “step 3”, zeebe broker go wrong.

Hey @iris,

thank you for reporting this!

I can reproduce this problem and created an BUG issue for this #1802.

Greets
Chris