@@ -152,13 +152,11 @@ go build -tags musl ./...
152152A dependency to the latest stable version of confluent-kafka-go should be automatically added to
153153your ` go.mod ` file.
154154
155-
156-
157155Install the client
158156------------------
159157
160158If Go modules can't be used we recommend that you version pin the
161- confluent-kafka-go import to v1 using gopkg.in:
159+ confluent-kafka-go import to ` v1 ` using gopkg.in:
162160
163161Manual install:
164162``` bash
@@ -184,15 +182,13 @@ The following platforms are supported by the prebuilt librdkafka binaries:
184182When building your application for Alpine Linux (musl libc) you must pass
185183` -tags musl ` to ` go get ` , ` go build ` , etc.
186184
187- ` CGO_ENABLED ` must NOT be set to 0 since the Go client is based on the
185+ ` CGO_ENABLED ` must NOT be set to ` 0 ` since the Go client is based on the
188186C library librdkafka.
189187
190188If GSSAPI/Kerberos authentication support is required you will need
191189to install librdkafka separately, see the ** Installing librdkafka** chapter
192190below, and then build your Go application with ` -tags dynamic ` .
193191
194-
195-
196192Installing librdkafka
197193---------------------
198194
@@ -216,26 +212,24 @@ Build from source:
216212 make
217213 sudo make install
218214
219-
220215After installing librdkafka you will need to build your Go application
221216with ` -tags dynamic ` .
222217
223- ** Note:** If you use the master branch of the Go client, then you need to use
224- the master branch of librdkafka.
218+ ** Note:** If you use the ` master ` branch of the Go client, then you need to use
219+ the ` master ` branch of librdkafka.
225220
226221** confluent-kafka-go requires librdkafka v1.6.0 or later.**
227222
228223
229-
230224API Strands
231225===========
232226
233- There are two main API strands: function and channel based.
227+ There are two main API strands: function and channel- based.
234228
235- Function Based Consumer
229+ Function- Based Consumer
236230-----------------------
237231
238- Messages, errors and events are polled through the consumer.Poll() function.
232+ Messages, errors and events are polled through the ` consumer.Poll() ` function.
239233
240234Pros:
241235
@@ -244,19 +238,18 @@ Pros:
244238Cons:
245239
246240 * Makes it harder to read from multiple channels, but a go-routine easily
247- solves that (see Cons in channel based consumer above about outdated events).
241+ solves that (see Cons in channel- based consumer below about outdated events).
248242 * Slower than the channel consumer.
249243
250244See [ examples/consumer_example] ( examples/consumer_example )
251245
252-
253- Channel Based Consumer (deprecated)
246+ Channel-Based Consumer (deprecated)
254247-----------------------------------
255248
256- * Deprecated* : The channel based consumer is deprecated due to the channel issues
257- mentioned below. Use the function based consumer.
249+ * Deprecated* : The channel- based consumer is deprecated due to the channel issues
250+ mentioned below. Use the function- based consumer.
258251
259- Messages, errors and events are posted on the consumer.Events channel
252+ Messages, errors and events are posted on the ` consumer.Events() ` channel
260253for the application to read.
261254
262255Pros:
@@ -273,16 +266,11 @@ Cons:
273266
274267See [ examples/consumer_channel_example] ( examples/consumer_channel_example )
275268
276-
277-
278-
279-
280-
281- Channel Based Producer
269+ Channel-Based Producer
282270----------------------
283271
284- Application writes messages to the producer.ProducerChannel.
285- Delivery reports are emitted on the producer.Events or specified private channel.
272+ Application writes messages to the ` producer.ProducerChannel() ` .
273+ Delivery reports are emitted on the ` producer.Events() ` or specified private channel.
286274
287275Pros:
288276
@@ -296,20 +284,19 @@ Cons:
296284
297285See [ examples/producer_channel_example] ( examples/producer_channel_example )
298286
299-
300- Function Based Producer
287+ Function-Based Producer
301288-----------------------
302289
303- Application calls producer.Produce() to produce messages.
304- Delivery reports are emitted on the producer.Events or specified private channel.
290+ Application calls ` producer.Produce() ` to produce messages.
291+ Delivery reports are emitted on the ` producer.Events() ` or specified private channel.
305292
306293Pros:
307294
308295 * Go: ish
309296
310297Cons:
311298
312- * Produce() is a non-blocking call, if the internal librdkafka queue is full
299+ * ` Produce() ` is a non-blocking call, if the internal librdkafka queue is full
313300 the call will fail.
314301 * Somewhat slower than the channel producer.
315302
@@ -331,4 +318,4 @@ See [kafka/README](kafka/README.md)
331318
332319Contributions to the code, examples, documentation, et.al, are very much appreciated.
333320
334- Make your changes, run gofmt, tests, etc, push your branch, create a PR, and [ sign the CLA] ( http://clabot.confluent.io/cla ) .
321+ Make your changes, run ` gofmt ` , tests, etc, push your branch, create a PR, and [ sign the CLA] ( http://clabot.confluent.io/cla ) .
0 commit comments