You should not read the file for every message, but instead cache the contents of the file in SHARED variables.
For this your message flow should have 2 input queues, one for getting the messages to route, and the second for a technical queue which would receive messages to initiate the reload of the file into cache.
This second part of the flow should look like this: MQ Input -> File Read -> Compute
And put the logic of storing the file contents to SHARED variables into the Compute.
So as you see, you don't read the file in ESQL, you do that by using the File Read node in your flow, and use ESQL only to process the file contents. And you can access the values stored in the SHARED variables in the first part of the flow where you do the routing.