kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkr...@apache.org
Subject svn commit: r1658291 - /kafka/site/082/api.html
Date Mon, 09 Feb 2015 02:00:24 GMT
Author: jkreps
Date: Mon Feb  9 02:00:23 2015
New Revision: 1658291

URL: http://svn.apache.org/r1658291
Log:
Delete the weird outline of the producer interface and just link to the javadoc.


Modified:
    kafka/site/082/api.html

Modified: kafka/site/082/api.html
URL: http://svn.apache.org/viewvc/kafka/site/082/api.html?rev=1658291&r1=1658290&r2=1658291&view=diff
==============================================================================
--- kafka/site/082/api.html (original)
+++ kafka/site/082/api.html Mon Feb  9 02:00:23 2015
@@ -1,45 +1,23 @@
-<h3><a id="producerapi">2.1 Producer API</a></h3>
-<pre>
-public interface Producer<K,V> extends Closeable {
 
-    /**
-     * Send the given record asynchronously and return a future which will eventually contain
the response information.
-     * 
-     * @param record The record to send
-     * @return A future which will eventually contain the response information
-     */
-    public Future<RecordMetadata> send(ProducerRecord<K,V> record);
-
-    /**
-     * Send a record and invoke the given callback when the record has been acknowledged
by the server
-     */
-    public Future<RecordMetadata> send(ProducerRecord<K,V> record, Callback callback);
-
-    /**
-     * Get a list of partitions for the given topic for custom partition assignment. The
partition metadata will change
-     * over time so this list should not be cached.
-     */
-    public List<PartitionInfo> partitionsFor(String topic);
-
-    /**
-     * Return a map of metrics maintained by the producer
-     */
-    public Map<MetricName, ? extends Metric> metrics();
-
-    /**
-     * Close this producer
-     */
-    public void close();
+We are in the process of rewritting the JVM clients for Kafka. As of 0.8.2 Kafka includes
a newly rewritten Java producer. The next release will include an equivalent Java consumer.
These new clients are meant to supplant the existing Scala clients, but for compatability
they will co-exist for some time. These clients are available in a seperate jar with minimal
dependencies, while the old Scala clients remain packaged with the server.
+
+<h3><a id="producerapi">2.1 Producer API</a></h3>
 
-}
- 
+As of the 0.8.2 release we encourage all new development to use the new Java producer. This
client is production tested and generally both faster and more fully featured than the previous
Scala client. You can use this client by adding a dependency on the client jar using the following
maven co-ordinates:
+<pre>
+	&lt;dependency&gt;
+	    &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
+	    &lt;artifactId&gt;kafka-clients&lt;/artifactId&gt;
+	    &lt;version&gt;0.8.2.0&lt;/version&gt;
+	&lt;/dependency&gt;
 </pre>
-You can follow
-<a href="http://kafka.apache.org/082/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html"
title="Kafka 0.8.2 producer example">this example</a> to learn how to use the producer
api.
+
+Examples showing how to use the producer are given in the 
+<a href="http://kafka.apache.org/082/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html"
title="Kafka 0.8.2 Javadoc">javadocs</a>.
 
 <p>
-The old producer api can be found <a href="http://kafka.apache.org/081/documentation.html#producerapi">
-here</a>. However, we encourage everyone to migrate to the new producer.
+For those interested in the legacy Scala producer api, information can be found <a href="http://kafka.apache.org/081/documentation.html#producerapi">
+here</a>.
 </p>
 
 <h3><a id="highlevelconsumerapi">2.2 High Level Consumer API</a></h3>



Mime
View raw message