implement Message#ToQuery