You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Shahbaz Chaudhary <sc...@genghisfund.com> on 2008/07/21 23:18:56 UTC

metadata describing message properties?

I didn't notice the ability to retreive the names and types of properties contained in messages in the JMS api.  Is this something qpid supports already or plans on supporting?  This is very similar to the metadata provided by the JDBC api.

The idea is that I want to type out text name of a destination, and programatically retreive the type of the message, bind it to a Jtable, etc.

Perhaps later, I would look to connect to a topic, and retrieve the complete list of destinations I havve access to, and continue on with allowing users to click on an automatically pre-populated list of destination and autogenerate jtables to view the data.

Thanks


Re: metadata describing message properties?

Posted by Robert Greig <ro...@gmail.com>.
2008/7/22 Shahbaz Chaudhary <sc...@genghisfund.com>:
> There is a getPropertyNames() function, but there doesn't seem to be one
> which returns the types of the fields.
>
> Secondly, the property names are delivered as part of a message, does
> this information exist on a destination level.  In other words, before a
> message is received, does (or can) the client known such meta data?

No, the properties are entirely in the application domain. You would
have to build something that returned a message containing the details
of the properties.

> My motivation is a generic Jtable which can be linked to a destination
> (topic or queue).  The JTable model needs to know the number of fields
> and their types, before a message is received.

The number of fields and their types is something your application
specifies. I'd create a Service queue as follows:

1) server registers a service listening on the Service queue
2) client creates a private queue
3) client sends a message to the Service queue with a property
indicating the operation is "queryProperties", and sets the ReplyTo
address to the private queue
4) server sends a message (in XML say) that contains the topics plus
the property names and types to the client's private queue
5) client can parse the message and do with it what it wants

You can obviously build in as much sophistication as you like into the services.

RG

RE: metadata describing message properties?

Posted by Shahbaz Chaudhary <sc...@genghisfund.com>.
There is a getPropertyNames() function, but there doesn't seem to be one
which returns the types of the fields.

Secondly, the property names are delivered as part of a message, does
this information exist on a destination level.  In other words, before a
message is received, does (or can) the client known such meta data?

My motivation is a generic Jtable which can be linked to a destination
(topic or queue).  The JTable model needs to know the number of fields
and their types, before a message is received.


-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Tuesday, July 22, 2008 4:14 AM
To: qpid-users@incubator.apache.org
Subject: Re: metadata describing message properties?

Shahbaz Chaudhary wrote:
> I didn't notice the ability to retreive the names and types of
> properties contained in messages in the JMS api.  Is this something
> qpid supports already or plans on supporting?  This is very similar
> to the metadata provided by the JDBC api.

I'm not entirely sure I'm answering the right question here, but JMS 
does indeed offer the ability to get and set various message properties 
and the Qpid JMS client implements them. See the javadoc for the Message

interface [1].

[1] http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html

Re: metadata describing message properties?

Posted by Gordon Sim <gs...@redhat.com>.
Shahbaz Chaudhary wrote:
> I didn't notice the ability to retreive the names and types of
> properties contained in messages in the JMS api.  Is this something
> qpid supports already or plans on supporting?  This is very similar
> to the metadata provided by the JDBC api.

I'm not entirely sure I'm answering the right question here, but JMS 
does indeed offer the ability to get and set various message properties 
and the Qpid JMS client implements them. See the javadoc for the Message 
interface [1].

[1] http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html