-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from vgenev/feature/#791-EventFramework
Feature/#791 event framework
- Loading branch information
Showing
26 changed files
with
8,072 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM node:10.15.3-alpine | ||
USER root | ||
|
||
WORKDIR /opt/event-stream-processor | ||
|
||
RUN apk --no-cache add git | ||
RUN apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake \ | ||
&& cd $(npm root -g)/npm \ | ||
&& npm config set unsafe-perm true \ | ||
&& npm install -g node-gyp | ||
|
||
COPY package.json package-lock.json* /opt/event-stream-processor/ | ||
|
||
RUN npm install --production && \ | ||
npm uninstall -g npm | ||
|
||
COPY src /opt/event-stream-processor/src | ||
COPY config /opt/event-stream-processor/config | ||
COPY app.js /opt/event-stream-processor/ | ||
# COPY docs /opt/central-event-processor/docs | ||
|
||
RUN apk del build-dependencies | ||
|
||
EXPOSE 3082 | ||
CMD node app.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# LICENSE | ||
|
||
Copyright © 2017 Bill & Melinda Gates Foundation | ||
|
||
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 | ||
(the "License") and you may not use these files except in compliance with the [License](http://www.apache.org/licenses/LICENSE-2.0). You may obtain a copy of the License at | ||
|
||
[http://www.apache.org/licenses/LICENSE-2.0]() | ||
|
||
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the [License](http://www.apache.org/licenses/LICENSE-2.0). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/***** | ||
License | ||
-------------- | ||
Copyright © 2017 Bill & Melinda Gates Foundation | ||
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | ||
Contributors | ||
-------------- | ||
This is the official list of the Mojaloop project contributors for this file. | ||
Names of the original copyright holders (individuals or organizations) | ||
should be listed with a '*' in the first column. People who have | ||
contributed from an organization can be listed under the organization | ||
that actually holds the copyright for their contributions (see the | ||
Gates Foundation organization for an example). Those individuals should have | ||
their names indented and be marked with a '-'. Email address can be added | ||
optionally within square brackets <email>. | ||
* Gates Foundation | ||
- Name Surname <[email protected]> | ||
* Valentin Genev <[email protected]> | ||
* Deon Botha <[email protected]> | ||
-------------- | ||
******/ | ||
|
||
'use strict' | ||
const setup = require('./src/setup').setup | ||
const Logger = require('@mojaloop/central-services-shared').Logger | ||
|
||
try { | ||
setup() | ||
} catch (err) { | ||
Logger.info(`Notifier throws an error ${err}`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"emailSettings": { | ||
"smtpConfig": { | ||
"host": "MAIL_NOTIF_SMTP_HOST", | ||
"port": "MAIL_NOTIF_SMTP_PORT", | ||
"secureConnection": "MAIL_NOTIF_SMTP_SECURE_FLAG", | ||
"tls": { | ||
"ciphers":"MAIL_NOTIF_SMTP_TLS_CIPHERS" | ||
}, | ||
"auth": { | ||
"user": "MAIL_NOTIF_SMTP_USER", | ||
"pass": "MAIL_NOTIF_SMTP_PASS" | ||
} | ||
} | ||
}, | ||
"PORT": "MAIL_NOTIF_PORT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"efk": { | ||
"host": "dev1-fluentd.mojaloop.live", | ||
"port": 24224, | ||
"timeout": 3.0, | ||
"reconnectInterval": 600, | ||
"requireAckResponse": true, | ||
"namespace": "logstash" | ||
}, | ||
"apm": { | ||
"serviceName": "event-stream-processor", | ||
"serverUrl": "http://dev1-apm.mojaloop.live:80" | ||
}, | ||
"PORT": 3082, | ||
"KAFKA": { | ||
"TOPIC_TEMPLATES": { | ||
"GENERAL_TOPIC_TEMPLATE": { | ||
"TEMPLATE": "topic-{{functionality}}", | ||
"REGEX": "topic-(.*)" | ||
} | ||
}, | ||
"PRODUCER": { | ||
"EVENT": { | ||
"config": { | ||
"options": { | ||
"messageCharset": "utf8" | ||
}, | ||
"rdkafkaConf": { | ||
"metadata.broker.list": "localhost:9092", | ||
"client.id": "es-prod-event", | ||
"event_cb": true, | ||
"dr_cb": true, | ||
"socket.keepalive.enable": true, | ||
"queue.buffering.max.messages": 10000000 | ||
}, | ||
"topicConf": { | ||
"request.required.acks": "all" | ||
} | ||
} | ||
} | ||
}, | ||
"CONSUMER": { | ||
"EVENT": { | ||
"config": { | ||
"options": { | ||
"mode": 2, | ||
"batchSize": 1, | ||
"recursiveTimeout": 100, | ||
"messageCharset": "utf8", | ||
"messageAsJSON": true, | ||
"sync": true, | ||
"consumeTimeout": 1000 | ||
}, | ||
"rdkafkaConf": { | ||
"client.id": "cep-event-mediation", | ||
"group.id": "cep-event-mediation-group", | ||
"metadata.broker.list": "localhost:9092", | ||
"socket.blocking.max.ms": 1, | ||
"fetch.wait.max.ms": 1, | ||
"fetch.error.backoff.ms": 1, | ||
"queue.buffering.max.ms": 1, | ||
"broker.version.fallback": "0.10.1.0", | ||
"api.version.request": true, | ||
"enable.auto.commit": false, | ||
"auto.commit.interval.ms": 200, | ||
"socket.keepalive.enable": true, | ||
"socket.max.fails": 1 | ||
}, | ||
"topicConf": { | ||
"auto.offset.reset": "earliest" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.