You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Fraser Adams <fr...@blueyonder.co.uk> on 2013/01/26 17:59:45 UTC
Is there a JMS API way to get the amqp Content-Type
Hello all,
I could have *sworn* I'd seen some postings some time back relating to
getting and setting the Content-Type.
Now I can get the type by down casting Message to the Qpid
AbstractJMSMessage e.g.
String contentType =
(org.apache.qpid.client.message.AbstractJMSMessage)message).getContentType();
But that's less than ideal as it uses Qpid classes not JMS Interfaces,
though it's definitely the only way to do it for older Qpid versions.
I've tried :
message.getJMSType();
and
message.getStringProperty("x-amqp.content-type");
But these are both returning me null. The latest Programming in Apache
Qpid says:
JMSType => mp.content_type
but as I say if I do System.out.println("type = " + m.getJMSType()); I
get null
Have I missed something? I really thought I'd read something on this a
bit back. Are there different "Content-Type" i.e. a user one and a
transport one? Is there a way to get hold of "amqp/list" without the
evil cast above?
You may sense a bit of a theme with amqp/list :-D
Cheers,
Frase
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Is there a JMS API way to get the amqp Content-Type
Posted by Rajith Attapattu <ra...@gmail.com>.
I was trying to do something about it but dropped the ball for reasons
I can't seem to remember.
I looked the code and we don't expose it.
I believe there is a JIRA for this.
Rajith
On Sat, Jan 26, 2013 at 11:59 AM, Fraser Adams
<fr...@blueyonder.co.uk> wrote:
> Hello all,
> I could have *sworn* I'd seen some postings some time back relating to
> getting and setting the Content-Type.
>
> Now I can get the type by down casting Message to the Qpid
> AbstractJMSMessage e.g.
>
> String contentType =
> (org.apache.qpid.client.message.AbstractJMSMessage)message).getContentType();
>
> But that's less than ideal as it uses Qpid classes not JMS Interfaces,
> though it's definitely the only way to do it for older Qpid versions.
>
>
> I've tried :
>
> message.getJMSType();
> and
> message.getStringProperty("x-amqp.content-type");
>
> But these are both returning me null. The latest Programming in Apache Qpid
> says:
>
> JMSType => mp.content_type
>
> but as I say if I do System.out.println("type = " + m.getJMSType()); I get
> null
>
>
> Have I missed something? I really thought I'd read something on this a bit
> back. Are there different "Content-Type" i.e. a user one and a transport
> one? Is there a way to get hold of "amqp/list" without the evil cast above?
>
> You may sense a bit of a theme with amqp/list :-D
>
> Cheers,
> Frase
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org