| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Ensure that round-robin partitioner works fine
* _load_metadata_for_topics() would cause duplicate and stale entries in
self.topic_partitions. Fix this
|
| |/
| |
| |
| |
| |
| | |
Provides support for two partitioners
* Round robin
* Hashed (default as per kafka clients)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous commit optimized the commit thread such that the timer
started only when there were messages to be consumed. This commit
goes a step further and ensures the following:
* Only one timer thread is created
* The main app does not block on exit (waiting for timer thread to finish)
This is ensured by having a single thread blocking on an event and
keeps calling a function. We use events instead of time.sleep() so
as to prevent the python interpreter from running every 50ms checking
if the timer has expired (logic copied from threading.Timer)
|
|/
|
|
|
|
|
| |
If there are no messages being consumed, the timer keeps
creating new threads at the specified intervals. This may
not be necessary. We can control this behaviour such that
the timer thread is started only when a message is consumed
|
|\
| |
| | |
Fix auto-commit issues with multi-threading
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
consumer.py and conn.py will be done later after pending merges
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* When you initiate a producer with a non-existant queue, the queue is
created. However this partition info is not reflected in KafkaClient()
immediately. So, we wait for a second and try loading it again.
Without this fix, if we do producer.send_messages() after creating a new
queue, the library will throw a StopIteration exception.
* In SimpleConsumer(), the defaults are not as mentioned in the comments.
Fix this (or do we change the documentation?)
* There was a problem with the way the consumer iterator worked.
for eg: assume that there were 10 messages in the queue/topic
and you iterate over it as -
for msg in consumer:
print (msg)
At the end of this, 'offset' that is saved is 10.
So, if you run the above loop again, the last message (10) is repeated.
This can be fixed by adjusting the offset counter before fetching
the message
* Avoid some code repeat in consumer.commit()
* Fix a bug in send_offset_commit_request() invocation in consumer.py
* Fix missing imports
|
|\
| |
| |
| |
| | |
Conflicts:
kafka/consumer.py
|
| |
| |
| |
| | |
Removed get_messages API, added test for get_pending
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will be easier to use in some cases where we have to get
only a specified set of messages. This API uses the __iter__
API internally, but maintains the state to give back only the
required set of messages
API is - get_messages(count=1)
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
The auto commit timer is one-shot. After the first commit, it does
not fire again. This ticket fixes the issue.
Also, in util.ReentrantTimer(), some duplicate code was cleaned up
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix a broken test (100k was too much to send in one batch)
|
| |
|
|
|
|
| |
Marking some stuff as not compatible for 0.8 (will be added in 0.8.1)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also added a bunch of docstrings
|
| |
|
|
|
|
| |
Also more docs
|
|
|
|
| |
Ref #8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Creates a producer process and one consumer process per partition. Uses
`multiprocessing.Queue` for communication between the parent process and
the producer/consumers.
```python
kafka = KafkaClient("localhost", 9092)
q = KafkaQueue(kafka, client="test-queue", partitions=[0,1])
q.put("test")
q.get()
q.close()
kafka.close()
```
Ref #8
|
|
|
|
| |
Fixes #2
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Can now:
```python
import kafka
kafka.KafkaClient("localhost", 9092)
```
or
```python
from kafka.client import KafkaClient
KafkaClient("localhost", 9092)
```
or
```python
import kafka.client
kafka.client.KafkaClient("localhost", 9092)
```
|
| |
|
|
|
|
| |
Snappy will go there when I get around to it
|
|
|