The RFA documentation and examples states to use the EventQueue.dispatch within a loop to keep listening to events. If for example, you were just sending a login request (ie kill when successful) or an adhoc market data request (so just getting a snapshot price and then closing the stream), what is the best way to control the dispatch?
I wouldn't think you would want to listen forever like a subscription but you can't not put it in a loop