You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Banias H <ba...@gmail.com> on 2015/09/15 20:51:58 UTC

Getting Kafka message key from tuple possible?

Hi,

My topology uses kafka-spout and I am able to read Kafka messages from
tuples in the bolt. Each Kafka message also has a key but I don't think
that got picked up by kafka-spout or got passed to bolts.

Am I correct?

-B

Re: Getting Kafka message key from tuple possible?

Posted by Andrey Yegorov <an...@gmail.com>.
Try using KeyValueScheme as a spout config scheme, something like that for
string key and string value:

spoutConfig.scheme = new KeyValueSchemeAsMultiScheme(new
StringKeyValueScheme());

----------
Andrey Yegorov

On Tue, Sep 15, 2015 at 11:51 AM, Banias H <ba...@gmail.com> wrote:

> Hi,
>
> My topology uses kafka-spout and I am able to read Kafka messages from
> tuples in the bolt. Each Kafka message also has a key but I don't think
> that got picked up by kafka-spout or got passed to bolts.
>
> Am I correct?
>
> -B
>