summaryrefslogtreecommitdiff
path: root/kafka/conn.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * nit: fixed misspellingZack Dever2014-03-031-1/+1
| |
* | Merge branch 'master' into conn_refactorMark Roberts2014-02-261-1/+27
|\ \ | |/ | | | | | | Conflicts: example.py
| * clean up after comments from @rdiomarmrtheb2014-02-151-3/+5
| |
| * Support list (or comma-separated) of hosts (replaces host and port arguments)mrtheb2014-02-091-1/+4
| |
| * Merge branch 'master' into multihostsmrtheb2014-01-311-48/+45
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: kafka/client.py kafka/conn.py setup.py test/test_integration.py test/test_unit.py
| * | Allow KafkaClient to take in a list of brokers for bootstrappingMarc Labbe2013-11-141-7/+26
| | |
* | | Minor refactor in conn.py, update version in __init__.py, add ErrorStringMark Roberts2014-02-251-8/+11
| |/ |/|
* | Merge pull request #107 from rdiomar/fix_default_timeoutsMarc Labbé2014-01-161-1/+7
|\ \ | | | | | | Increase default connection timeout
| * | Change default socket timeout to 120 seconds in both the client and connectionOmar Ghishan2014-01-161-3/+4
| | |
| * | Make the default connection timeout NoneOmar Ghishan2014-01-161-1/+6
| | | | | | | | | | | | This fixes the default behavior, which used to cause a socket timeout when waiting for 10 seconds for a message to be produced.
* | | Merge branch 'repr' of https://github.com/mahendra/kafka-python into ↵mrtheb2014-01-141-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | mahendra-repr Conflicts: kafka/client.py kafka/consumer.py
| * | Add proper string representations for each classMahendra M2013-10-081-1/+1
| |/
* | remove zero length field name in format string, to work in Python 2.6Vadim Graboys2014-01-131-1/+1
| |
* | Change log.error() back to log.exception()Omar Ghishan2014-01-081-3/+3
| |
* | Change BufferUnderflowError to ConnectionError in conn._read_bytes()Omar Ghishan2014-01-081-3/+2
| | | | | | Both errors are handled the same way when raised and caught, so this makes sense.
* | Remove unnecessary methodOmar Ghishan2014-01-071-17/+8
| |
* | Handle dirty flag in conn.recv()Omar Ghishan2014-01-071-1/+3
| | | | | | | | | | * If the connection is dirty, reinit * If we get a BufferUnderflowError, the server could have gone away, so mark it dirty
* | Use the same timeout when reinitializing a connectionOmar Ghishan2014-01-071-2/+3
| |
* | Raise a ConnectionError when a socket.error is raised when receiving dataOmar Ghishan2014-01-061-7/+11
| | | | | | | | Also, log.exception() is unhelpfully noisy. Use log.error() with some error details in the message instead.
* | * Guarantee reading the expected number of bytes from the socket every timeOmar Ghishan2014-01-061-26/+22
| | | | | | | | | | | | | | | | | | | | | | | | * Remove bufsize from client and conn, since they're not actually enforced Notes: This commit changes behavior a bit by raising a BufferUnderflowError when no data is received for the message size rather than a ConnectionError. Since bufsize in the socket is not actually enforced, but it is used by the consumer when creating requests, moving it there until a better solution is implemented.
* | Read the correct number of bytes from kafka.Omar Ghishan2014-01-061-3/+2
| | | | | | | | | | | | According to the protocol documentation, the 4 byte integer at the beginning of a response represents the size of the payload only, not including those bytes. See http://goo.gl/rg5uom
* | Allow customizing socket timeouts.Omar Ghishan2014-01-061-2/+2
| | | | | | | | | | | | Previously, if you try to consume a message with a timeout greater than 10 seconds, but you don't receive data in those 10 seconds, a socket.timeout exception is raised. This allows a higher socket timeout to be set, or even None for no timeout.
* | reduce memory copies when consuming kafka responsesEvan Klitzke2013-12-251-5/+2
|/
* Merge branch 'master' into prod-windowsMahendra M2013-10-081-10/+18
|\ | | | | | | | | Conflicts: kafka/producer.py
| * make changes to be more fault tolerant: clean up connections, brokers, ↵Jim Lim2013-10-041-10/+18
| | | | | | | | | | | | | | | | failed_messages - add integration tests for sync producer - add integration tests for async producer w. leadership election - use log.exception
* | Ensure that async producer works in windows. Fixes #46Mahendra M2013-10-071-2/+13
|/ | | | | | | | | | | | | | | As per the multiprocessing module's documentation, the objects passed to the Process() class must be pickle-able in Windows. So, the Async producer did not work in windows. To fix this we have to ensure that code which uses multiprocessing has to follow certain rules * The target=func should not be a member function * We cannot pass objects like socket() to multiprocessing This ticket fixes these issues. For KafkaClient and KafkaConnection objects, we make copies of the object and reinit() them inside the child processes.
* flake8 pass (pep8 and pyflakes)mrtheb2013-10-031-6/+14
|
* don't forget to call superclass __init__Vetoshkin Nikita2013-10-031-0/+1
|
* style: fix camelCase variable names againVetoshkin Nikita2013-10-031-2/+2
|
* style: fix camelCase variable names once moreVetoshkin Nikita2013-10-031-3/+3
|
* style: fix camelCase variable namesVetoshkin Nikita2013-10-031-2/+2
| | | | | | Conflicts: kafka/util.py
* style: use triple quotes for docstringsVetoshkin Nikita2013-10-031-2/+6
|
* style: fix whitespacesVetoshkin Nikita2013-10-031-0/+2
|
* Merge branch 'issue-35'David Arthur2013-07-261-0/+9
|\ | | | | | | | | | | | | Conflicts: kafka/__init__.py kafka/consumer.py test/test_integration.py
| * Re-init the sockets in the new processMahendra M2013-06-271-0/+9
| |
* | Make the default case as 'ack on local write'Mahendra M2013-06-201-1/+1
|/ | | | | | | Also, ensure that the case of 'no-acks' works fine In conn.send(), do not wait for the response. Wait for it only on conn.recv(). This behaviour is fine now since the connection is not shared among consumer threads etc.
* Fix auto-commit issues with multi-threadingMahendra M2013-06-031-1/+2
|
* Adding a debug statementDavid Arthur2013-05-281-1/+2
|
* Update kafka-src to latest 0.8David Arthur2013-04-021-1/+2
| | | | Fix a broken test (100k was too much to send in one batch)
* Big code re-orgDavid Arthur2013-04-021-0/+85