KafkaContext

  
class KafkaContext extends BaseRpcContext {
  constructor(args: KafkaContextArgs)
  getMessage()
  getPartition()
  getTopic()
  getConsumer()
  getHeartbeat()
  getProducer()

  // inherited from nest/packages/microservices/BaseRpcContext
  constructor(args: T)
  protected args: T
  getArgs(): T
  getArgByIndex(index: number)
}

Constructor


constructor(args: KafkaContextArgs)

Parameters

Option Type Description
args KafkaContextArgs

Methods

getMessage()

Returns the reference to the original message.


getMessage()

Parameters

There are no parameters.

getPartition()

Returns the partition.


getPartition()

Parameters

There are no parameters.

getTopic()

Returns the name of the topic.


getTopic()

Parameters

There are no parameters.

getConsumer()

Returns the Kafka consumer reference.


getConsumer()

Parameters

There are no parameters.

getHeartbeat()

Returns the Kafka heartbeat callback.


getHeartbeat()

Parameters

There are no parameters.

getProducer()

Returns the Kafka producer reference,


getProducer()

Parameters

There are no parameters.