Hello, we are using external worker tasks in following scenario:
- Listen for external worker task job. There is several ways: event listeners, external worker job interceptor. We are using afterCreateExternalJobInterctor method.
- After job is created we sent it to Kafka
- After receiving job in kafka we try to acquire and lock it (by topic of course)
It happens almost immediately but job is not available on step 3 via management service acquirer.
Adding 1 second delay before sending to kafka actually solves that problem, but it is not elegant one.
I suppose that method afterCreateExternalJobInterctor should be executed only after transaction is completed.
PS: Also tried with FlowableListener events. It is also not working if we try to send to kafka on ENTITY_CREATED or ENTITY_INITIALIZED events. Both on COMMITED/COMMITING transactions.