Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> Send multiple messages to multiple topics in one request


Copy link to this message
-
Re: Send multiple messages to multiple topics in one request
Yes, your understanding is correct.

Thanks,

Jun
On Tue, Jun 4, 2013 at 12:36 AM, Vadim Keylis <[EMAIL PROTECTED]> wrote:

> Version 7 of Kafka allowed to send messages to multiple topics within one
> request. I assume I can do
> samething in version 8, am I correct? Does my code piece look correct?
> List<KeyedMessage<String, String>> topicsMsgsList = new ArrayList();
> KeyedMessage<String, String> data1 = new KeyedMessage<String,
> String>(topic1, msg);
> KeyedMessage<String, String> data2 = new KeyedMessage<String,
> String>(topic2, msg);
> topicsMsgsList.add(data1);
> topicsMsgsList.add(data2);
>  producer.send( topicsMsgsList );
>
> Thanks,
> Vadim
>

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB