I've worked with activemqcpp API before in a few projects, but I've always known what type the message are beforehand, so the dynamic casting to the corresponding message subclass was safe.
Now I'm building a wrapper for the MQ library and can't find a way to recognize from a base Message pointer (as returned by a receive) what message subclass does it match to cast it accordingly.