Kafka
  1. Kafka
  2. KAFKA-419

Updated PHP client library to support kafka 0.7+

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.7, 0.8.0
    • Fix Version/s: None
    • Component/s: clients
    • Labels:
    • Environment:
      N/A

      Description

      I updated the PHP client library to fully work with the kafka code in trunk, with the following improvements:

      • added support for GZIP compression (both in the producer and the consumer);
      • implemented stream-based iteration of messages (rather than loading the entire response in memory);
      • added base Kafka_Exception class (extending RuntimeException) and some child classes to catch specific errors;
      • added validation and error checking in several parts of the code (like CRC validation of messages, stream connection/EOF checks, response code verification);
      • added example producer for compressed messages.

      The code is fully tested (vast improvements to the existing test suite are provided with the patch), and already incorporates a proper fix for KAFKA-319 (which can be rejected).
      The API hasn't changed and is 100% backwards compatible.

      1. phpclient.patch
        43 kB
        Lorenzo Alberton
      2. phpclient.new.patch
        126 kB
        Lorenzo Alberton

        Issue Links

          Activity

          Lorenzo Alberton created issue -
          Lorenzo Alberton made changes -
          Field Original Value New Value
          Attachment phpclient.patch [ 12538011 ]
          Lorenzo Alberton made changes -
          Attachment phpclient.patch [ 12538011 ]
          Lorenzo Alberton made changes -
          Comment [ Patch to update the PHP client to work with Kafka 0.7+ ]
          Lorenzo Alberton made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Affects Version/s 0.7 [ 12317243 ]
          Lorenzo Alberton made changes -
          Link This issue supercedes KAFKA-319 [ KAFKA-319 ]
          Lorenzo Alberton made changes -
          Attachment phpclient.patch [ 12538027 ]
          Lorenzo Alberton made changes -
          Attachment phpclient.new.patch [ 12545281 ]
          Lorenzo Alberton made changes -
          Attachment phpclient.new.patch [ 12545281 ]
          Lorenzo Alberton made changes -
          Attachment phpclient.new.patch [ 12545327 ]
          Jun Rao made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Jun Rao made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Lorenzo Alberton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development