Skip to content

Commit

Permalink
refactored names to make more sense
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor Gautier committed Aug 27, 2011
1 parent fdbdb4a commit 5af98e7
Show file tree
Hide file tree
Showing 8 changed files with 346 additions and 347 deletions.
File renamed without changes.
16 changes: 8 additions & 8 deletions examples/consume-last-offset.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
*/
var kafka = require('kafka')

var consumer = new kafka.BasicConsumer({
var client = new kafka.Client({
host:'localhost',
port:9092,
})

consumer.on('message', function(topic, message, offset) {
client.on('message', function(topic, message, offset) {
console.log("Consumed topic:" + topic + " message:" + message)
})
consumer.on('lastmessage', function(topic, offset) {
consumer.fetchTopic({name: topic, offset: offset})
client.on('lastmessage', function(topic, offset) {
client.fetchTopic({name: topic, offset: offset})
})
consumer.on('lastoffset', function(topic, offset) {
consumer.fetchTopic({name: topic, offset: offset})
client.on('lastoffset', function(topic, offset) {
client.fetchTopic({name: topic, offset: offset})
})
consumer.connect(function() {
consumer.fetchOffsets('test')
client.connect(function() {
client.fetchOffsets('test')
})
2 changes: 1 addition & 1 deletion kafka.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
Producer: require('./lib/Producer'),
Consumer: require('./lib/Consumer'),
BasicConsumer: require('./lib/BasicConsumer'),
Client: require('./lib/Client'),
error: require('./lib/error')
}

310 changes: 0 additions & 310 deletions lib/BasicConsumer.js

This file was deleted.

Loading

0 comments on commit 5af98e7

Please sign in to comment.