You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mahendran m <ma...@hotmail.com> on 2015/02/24 11:48:04 UTC

Adding mime type to different type of messages

I am sending different type of message like xml , JSON, and text using  JMS Text message. In the consumer side i need to differentiate the  incoming message as Xml or Json or Text message , how  can i achieve this ? .Is there any in built option available to set and get the MIME type like we are setting the content type in Http request ? 		 	   		  

RE: Adding mime type to different type of messages

Posted by Tim Bain <tb...@alumni.duke.edu>.
If there isn't a built-in context-type header (you'll have to research
that; I don't know either way), you can always set your own custom header
by calling setStringProperty()/setDoubleProperty()/etc.  (That's for Java;
I don't use NMS, but a quick Google seems to indicate that there's a
Properties object to do this in NMS.)

Tim
On Feb 24, 2015 4:12 AM, "mahendran m" <ma...@hotmail.com> wrote:

> No , i need didn't use stop . In java i am using JMS Message API and in c#
> i am using NMS Message API . How can i achieve now ?
> > Subject: Re: Adding mime type to different type of messages
> > From: shedis@gmail.com
> > Date: Tue, 24 Feb 2015 12:58:25 +0200
> > To: users@activemq.apache.org
> >
> > If using stomp have a look at v1.2 spec for Header content-type section.
> >
> > Sent from my Mobile Device!
> >
> > > On Feb 24, 2015, at 12:48, mahendran m <ma...@hotmail.com>
> wrote:
> > >
> > > I am sending different type of message like xml , JSON, and text
> using  JMS Text message. In the consumer side i need to differentiate the
> incoming message as Xml or Json or Text message , how  can i achieve this ?
> .Is there any in built option available to set and get the MIME type like
> we are setting the content type in Http request ?
>

RE: Adding mime type to different type of messages

Posted by mahendran m <ma...@hotmail.com>.
No , i need didn't use stop . In java i am using JMS Message API and in c# i am using NMS Message API . How can i achieve now ?
> Subject: Re: Adding mime type to different type of messages
> From: shedis@gmail.com
> Date: Tue, 24 Feb 2015 12:58:25 +0200
> To: users@activemq.apache.org
> 
> If using stomp have a look at v1.2 spec for Header content-type section.
> 
> Sent from my Mobile Device!
> 
> > On Feb 24, 2015, at 12:48, mahendran m <ma...@hotmail.com> wrote:
> > 
> > I am sending different type of message like xml , JSON, and text using  JMS Text message. In the consumer side i need to differentiate the  incoming message as Xml or Json or Text message , how  can i achieve this ? .Is there any in built option available to set and get the MIME type like we are setting the content type in Http request ?                         
 		 	   		  

Re: Adding mime type to different type of messages

Posted by Shedis <sh...@gmail.com>.
If using stomp have a look at v1.2 spec for Header content-type section.

Sent from my Mobile Device!

> On Feb 24, 2015, at 12:48, mahendran m <ma...@hotmail.com> wrote:
> 
> I am sending different type of message like xml , JSON, and text using  JMS Text message. In the consumer side i need to differentiate the  incoming message as Xml or Json or Text message , how  can i achieve this ? .Is there any in built option available to set and get the MIME type like we are setting the content type in Http request ?