class Consumer extends Object with IEventEmitter
Kafka-Node Consumer
- Annotations
- @RawJSType() @native() @JSImport( "kafka-node" , "Producer" )
- Alphabetic
- By Inheritance
- Consumer
- IEventEmitter
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Consumer(client: Client, payloads: Array[FetchRequest], options: |[ConsumerOptions, RawOptions] = js.native)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addListener(eventName: String, listener: Function): Consumer.this.type
- Definition Classes
- IEventEmitter
-
def
addTopics(topics: String, callback: Function): Unit
Add topics to current consumer, if any topic to be added not exists, return error
Add topics to current consumer, if any topic to be added not exists, return error
addTopics(topics, callback, fromOffset)
Example: -
def
addTopics(topics: String, callback: Function, fromOffset: Boolean): Unit
Add topics to current consumer, if any topic to be added not exists, return error
Add topics to current consumer, if any topic to be added not exists, return error
addTopics(topics, callback, fromOffset)
Example: -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close(callback: Function): Unit
Closes the consumer
Closes the consumer
- callback
the callback
consumer.close(force, callback)
Example: -
def
commit(callback: Function): Unit
Commit offset of the current topics manually, this method should be called when a consumer leaves.
Commit offset of the current topics manually, this method should be called when a consumer leaves.
consumer.commit(function(err, data) { .. });
Example: -
val
domain: String
- Definition Classes
- IEventEmitter
-
def
emit(name: String, args: Any*): Any
- Definition Classes
- IEventEmitter
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getMaxListeners(): Int
- Definition Classes
- IEventEmitter
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
def
listenerCount(eventName: String): Int
- Definition Classes
- IEventEmitter
-
def
listeners(eventName: String): Array[Function]
- Definition Classes
- IEventEmitter
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
on(eventName: String, listener: Function): Consumer.this.type
- Definition Classes
- IEventEmitter
-
def
once(eventName: String, listener: Function): Consumer.this.type
- Definition Classes
- IEventEmitter
-
def
pause(): Unit
Pauses the consumer
Pauses the consumer
consumer.pause()
Example: -
def
pauseTopics(topics: Array[String]): Unit
Pause specific topics
Pause specific topics
consumer.pauseTopics(topics)
Example: -
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
removeAllListeners(): Consumer.this.type
- Definition Classes
- IEventEmitter
-
def
removeAllListeners(eventName: String): Consumer.this.type
- Definition Classes
- IEventEmitter
-
def
removeListener(eventName: String, listener: Function): Consumer.this.type
- Definition Classes
- IEventEmitter
-
def
removeTopics(topics: Array[String], callback: Function): Unit
Removes an array of topics
Removes an array of topics
- topics
the array of topics to remove
- callback
the callback
consumer.removeTopics(['t1', 't2'], function (err, removed) { .. })
Example: -
def
resume(): Unit
Resume the consumers
Resume the consumers
consumer.resume()
Example: -
def
resumeTopics(topics: Array[String]): Unit
Resume specific topics
Resume specific topics
consumer.resumeTopics(topics)
Example: -
def
setMaxListeners(n: Int): Consumer.this.type
- Definition Classes
- IEventEmitter
-
def
setOffset(topic: String, partition: Int, offset: Int): Unit
Set offset of the given topic
Set offset of the given topic
consumer.setOffset('topic', 0, 0)
Example: -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
usingDomains: Boolean
- Definition Classes
- IEventEmitter
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )