You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Patrick Ruckstuhl <pa...@tario.org> on 2008/06/18 19:07:32 UTC

Best way to find out which type of Message was received

Hi

What is the best way to find which type (TextMessage, MapMessage, ...) of
message was received?

I'm currently using a dynamic_cast check to find out which type it is, but
I'm wondering if there's a better way.
-- 
View this message in context: http://www.nabble.com/Best-way-to-find-out-which-type-of-Message-was-received-tp17987537p17987537.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Best way to find out which type of Message was received

Posted by Rob Davies <ra...@gmail.com>.
On 18 Jun 2008, at 18:07, Patrick Ruckstuhl wrote:

>
> Hi
>
> What is the best way to find which type (TextMessage,  
> MapMessage, ...) of
> message was received?
>
> I'm currently using a dynamic_cast check to find out which type it  
> is, but
> I'm wondering if there's a better way.
> -- 
> View this message in context: http://www.nabble.com/Best-way-to-find-out-which-type-of-Message-was-received-tp17987537p17987537.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Dynamic cast checking is the best generic way. There is some specific  
ActiveMQ ninja stuff you could do - but that is subject to change



cheers,

Rob

http://open.iona.com/products/enterprise-activemq
http://rajdavies.blogspot.com/