event-system-client
v1.2.1
Published
easy way to create structure of event process
Downloads
9
Readme
How To Use NPM
step 1 : first install the npm package ('event-system-client') step 2 : import the KafkaModel from the npm package step 3 : provide some mendatory field in KafkaModel(KAFKA_BROKERS: string, KAFKA_CLIENT: string, KAFKA_GROUP_ID: string, options:{ ssal:string, retry : number requestTimeout : number }) step 4 : in option we can provide some fields like => sasl , retry , requestTimeout (Note : option is not mandetory) step 5 : there are functions 1) emit 2) on emit => this function is used to send the data on the topic and the format should be like (newData: { data: any, type: string }) on => this function is used to get the data from the same topic and we have to pass callback function to store the data in corresponding db.