You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Syed Mudassir Ahmed <sm...@snaplogic.com> on 2017/03/14 06:58:15 UTC

Question on Metadata

Hi guys,
  When we consume a JMS message, we get a Message object that has methods
to fetch implicit metadata provided by JMS server.
http://docs.oracle.com/javaee/6/api/javax/jms/Message.html.  There are
methods to fetch that implicit metadata such as Expiration, Correlation ID,
etc.

  Is there a way to fetch any such implicit metadata while consuming a
kafka message?  Any pointers to do that would be greatly appreciated.

  Thanks in advance.

-- 
Thanks,
Syed.

Re: Question on Metadata

Posted by Hans Jespersen <ha...@confluent.io>.
You may also be interested to try out the new Confluent JMS client for Kafka. It implements the JMS 1.1. API along with all the JMS metadata fields and access methods. It does this by putting/getting the JMS metadata into the body of an underlying Kafka message which is defined with a special JMS AVRO schema that includes both the JMS metadata as well as the JMS message body (which can be any of the JMS message types).

-hans


> On Mar 14, 2017, at 9:26 AM, Robert Quinlivan <rq...@signal.co> wrote:
> 
> Did you look at the ConsumerRecord
> <https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/consumer/ConsumerRecord.html>
> class?
> 
> On Tue, Mar 14, 2017 at 11:09 AM, Syed Mudassir Ahmed <
> smudassir@snaplogic.com> wrote:
> 
>> Can anyone help?
>> 
>> ---------- Forwarded message ----------
>> From: "Syed Mudassir Ahmed" <sm...@snaplogic.com>
>> Date: Mar 14, 2017 12:28 PM
>> Subject: Question on Metadata
>> To: <us...@kafka.apache.org>
>> Cc:
>> 
>> Hi guys,
>>  When we consume a JMS message, we get a Message object that has methods
>> to fetch implicit metadata provided by JMS server.
>> http://docs.oracle.com/javaee/6/api/javax/jms/Message.html.  There are
>> methods to fetch that implicit metadata such as Expiration, Correlation ID,
>> etc.
>> 
>>  Is there a way to fetch any such implicit metadata while consuming a
>> kafka message?  Any pointers to do that would be greatly appreciated.
>> 
>>  Thanks in advance.
>> 
>> --
>> Thanks,
>> Syed.
>> 
> 
> 
> 
> -- 
> Robert Quinlivan
> Software Engineer, Signal


Re: Question on Metadata

Posted by Robert Quinlivan <rq...@signal.co>.
Did you look at the ConsumerRecord
<https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/consumer/ConsumerRecord.html>
class?

On Tue, Mar 14, 2017 at 11:09 AM, Syed Mudassir Ahmed <
smudassir@snaplogic.com> wrote:

> Can anyone help?
>
> ---------- Forwarded message ----------
> From: "Syed Mudassir Ahmed" <sm...@snaplogic.com>
> Date: Mar 14, 2017 12:28 PM
> Subject: Question on Metadata
> To: <us...@kafka.apache.org>
> Cc:
>
> Hi guys,
>   When we consume a JMS message, we get a Message object that has methods
> to fetch implicit metadata provided by JMS server.
> http://docs.oracle.com/javaee/6/api/javax/jms/Message.html.  There are
> methods to fetch that implicit metadata such as Expiration, Correlation ID,
> etc.
>
>   Is there a way to fetch any such implicit metadata while consuming a
> kafka message?  Any pointers to do that would be greatly appreciated.
>
>   Thanks in advance.
>
> --
> Thanks,
> Syed.
>



-- 
Robert Quinlivan
Software Engineer, Signal

Fwd: Question on Metadata

Posted by Syed Mudassir Ahmed <sm...@snaplogic.com>.
Can anyone help?

---------- Forwarded message ----------
From: "Syed Mudassir Ahmed" <sm...@snaplogic.com>
Date: Mar 14, 2017 12:28 PM
Subject: Question on Metadata
To: <us...@kafka.apache.org>
Cc:

Hi guys,
  When we consume a JMS message, we get a Message object that has methods
to fetch implicit metadata provided by JMS server.
http://docs.oracle.com/javaee/6/api/javax/jms/Message.html.  There are
methods to fetch that implicit metadata such as Expiration, Correlation ID,
etc.

  Is there a way to fetch any such implicit metadata while consuming a
kafka message?  Any pointers to do that would be greatly appreciated.

  Thanks in advance.

-- 
Thanks,
Syed.