routes/stream.js
/**
 * kafkaSse function wrapper that uses app config and req logger.
 * This function only exists to DRY route creation below.
 */
kafkaSse function wrapper that uses app config and req logger.
This function only exists to DRY route creation below.
kafkaSse function wrapper that uses app config and req logger . This function only exists to DRY route creation below .
function eventStream(req, res, topics) {
    return kafkaSse(req, res, topics, {
        allowedTopics:          topics,
        logger:                 req.logger._logger,
        kafkaConfig:            app.conf.kafka,
        deserializer:           eUtil.deserializer
    });
}
function eventStream ( req , res , topics ) { return kafkaSse ( req , res , topics , { allowedTopics : topics , logger : req . logger . _logger , kafkaConfig : app . conf . kafka , deserializer : eUtil . deserializer } ) ; }
kafkaSse function wrapper that uses app config and req logger.
kafkaSse function wrapper that uses app config and req logger .
// Using topics for allowedTopics may seem redundant, but it // prevents requests for /stream/streamA from consuming from topics // that are not configured for streamA by setting other topics // in the Last-Event-ID header.  Last-Event-ID topic, partition, offset // assignments will take precedence over topics parameter. // Give kafkaSse the request bunyan logger to use. // Use the eventstreams custom deserializer to include // kafka message meta data in the deserialized message.meta object // that will be sent to the client as an event.