The official documentation for the Client API (Consumer) currently advocates to use the jackdaw.client.log/log function to retrieve messages. However, when working with the Consumer API I encountered several problems when using jackdaw.client.log/log. It looks like the log function is intended to be used for testing purposes only. It doesn't allow the consumer to commit offsets after each poll, for example, and the function itself is not tested in Jackdaw.
The correct function to use in production code, seems to be poll, in combination with a looping construct.
Proposed changes:
Fix the documentation for the Client API (Consumer) to use the poll method, and add a working code example demonstrating its usage. Working on the fixes on branch louiseklodt/fix-consumer-docs-for-poll
The official documentation for the Client API (Consumer) currently advocates to use the
jackdaw.client.log/log
function to retrieve messages. However, when working with the Consumer API I encountered several problems when usingjackdaw.client.log/log
. It looks like thelog
function is intended to be used for testing purposes only. It doesn't allow the consumer to commit offsets after each poll, for example, and the function itself is not tested in Jackdaw.The correct function to use in production code, seems to be
poll
, in combination with a looping construct.Proposed changes: Fix the documentation for the Client API (Consumer) to use the
poll
method, and add a working code example demonstrating its usage. Working on the fixes on branchlouiseklodt/fix-consumer-docs-for-poll