Commit 3a6975d0 authored by Tobinsk's avatar Tobinsk
Browse files

Merge branch '8-loose-of-connections' into 'master'

Active pull messages on error and on a certain interval

Closes #8

See merge request !22
parents 205d3cd7 34784d22
Pipeline #2991 passed with stage
in 2 minutes and 40 seconds
FROM node:10-alpine
FROM node:10-slim
# add basic libs
RUN apk --no-cache add \
RUN apt-get update && apt-get install -y \
bash \
g++ \
gcc \
ca-certificates \
lz4-dev \
musl-dev \
cyrus-sasl-dev \
openssl-dev \
make \
python \
bash \
git
RUN apk add --no-cache --virtual .build-deps gcc zlib-dev libc-dev bsd-compat-headers py-setuptools libexecinfo libexecinfo-dev
# Create app directory
RUN mkdir -p /usr/local/app
......
......@@ -84,8 +84,13 @@ kafka.init().then(async () => {
*/
consumer.on('event.error', function(err) {
logger.warn('Kafka consumer event error', err); // Here this error being logged
consumer.consume();
});
// active trigger a consume every 10s
// https://github.com/Blizzard/node-rdkafka/issues/182
setTimeout(() => consumer.consume(), 10000);
/**
* Small middleware to inject kafka into the middlewar-stack
* @param {InterfaceRequestApi} req
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment