createEventSubscriptionQuery not returning a result

Hi, we are using an embedded process engine. When we attempt to correlate a message we first execute a createEventSubscriptionQuery to verify that the particular workflow is waiting for a the corresponding event. We are seeing instances where the waiting workflow is not found, but the event subscription does already exist. The latest case the event subscription has a CREATED_ = 2019-03-11 09:03:52.0066667 and according to our logs the createEventSubscriptionQuery that returned nothing was executed at 2019-03-11 09:03:52.254.

Our query is implemented as follows:
runtimeService.createEventSubscriptionQuery()
.processInstanceId(id)
.eventName(messageName)
.list()

So if the query was actually hitting the database it should have found it. I’ve read a couple of threads about caching in case that might be happening. This one seems to indicate that createXQuery type queries always hit the database though: General implemented pattern for cache vs DB lookups for Process Engine Services?.

If we manually trigger the correlation later the event is found and the workflow continues.

A bit more information that I didn’t include. Our process engine runs as part of a microservice which runs in a Kubernetes cluster. There are two instances of this microservice running, i.e two process engines using the same database.