You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jai_M <mj...@yahoo.com> on 2010/07/27 02:18:36 UTC

Selector and payload

This might be a really stupid question but I had to get it cleared.

I create a ActiveMQTextMessage with a simple string. 

ActiveMQTextMessage message = new ActiveMQTextMessage();
message.setJMSType("text");
message.setProperty("msgOpCode", "some_Op_code");				
message.setText("Some string");

I am able to apply selectors on the property msgOpCode as well as the text.

The JMS specification says that "Only messages whose header and property
values match the selector are delivered"
So, what exactly is a payload in a ActiveMQMessage. I want the contents that
I set in the text to be the  payload/body of the message. How do I set this
?
-- 
View this message in context: http://old.nabble.com/Selector-and-payload-tp29271967p29271967.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Selector and payload

Posted by cobrien <cl...@ttmsolutions.com>.
I don't think  most providers read the JMS  as  exclusionary but anyway if
you want to use only API provided by the JMS specifications then you can. 
The examples included with  ActiveMQ  provide examples on how to send
messages using only the  JMS standard API. 
-clark 

www.ttmsolutions.com 
ActiveMQ reference guide at 
http://bit.ly/AMQRefGuide


Jai_M wrote:
> 
> This might be a really stupid question but I had to get it cleared.
> 
> I create a ActiveMQTextMessage with a simple string. 
> 
> ActiveMQTextMessage message = new ActiveMQTextMessage();
> message.setJMSType("text");
> message.setProperty("msgOpCode", "some_Op_code");				
> message.setText("Some string");
> 
> I am able to apply selectors on the property msgOpCode as well as the
> text.
> 
> The JMS specification says that "Only messages whose header and property
> values match the selector are delivered"
> So, what exactly is a payload in a ActiveMQMessage. I want the contents
> that I set in the text to be the  payload/body of the message. How do I
> set this ?
> 

-- 
View this message in context: http://old.nabble.com/Selector-and-payload-tp29271967p29279009.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.