No, there isn't.
Any respectable FIX counterparty will have a spec that tells you which messages types they will send to you (as well as which fields these messages might contain).
Therefore, you should know all the message types you need to support, and can provide an OnMessage
call for each of them.
You could pre-test the message string's type field before calling crack()
. That would work, but I think it's misguided.