added hashcode function to MsgQuery
added concurrent dictionary