What method of the cms::MapMessage do I use to extract the values from a
ActiveMQ.Statistics.Broker query? I'm getting a reply and I can output a
list of map names but no values!
Using this code :
const cms::MapMessage * map = dynamic_cast < const cms::MapMessage *
>(message) ;
const std::vector < std::string > mi = map->getMapNames() ;
std::cout << "Map Vector : " << mi.size() << std::endl ;
for (std::vector < std::string >::const_iterator ci = mi.cbegin(); ci !=
mi.cend(); ci++)
{
const std::string element = *(ci) ;
std::cout << "Key : " << element << " Value : " << map->getString(element)
;
}
It crashes the application but if I comment out the map->getString(element)
I get a list of names!
Can anyone help with this?
--
Bill