Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

bancolombia/async-dataflow-channel-client-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The decision was made to have all async data flow components in a single repository.

Channel client JS

NPM

Javascript library for async data flow implementation for browsers.

How to use

you need to have a running instances of async-dataflow-channel-sender

Install

npm install chanjs-client --save

AsyncClient basic usage example

You can understand better the flow with this sequence diagram. imagen

import { AsyncClient } from 'chanjs-client';

...
const client = new AsyncClient({
    socket_url: "wss://some.domain:8984/socket",
    channel_ref: "some_channel_ref",
    channel_secret: "secret_from_some_auth_service",
    heartbeat_interval: 200
});
...
Parameters Description Default Value
socket_url async-dataflow-channel-sender cluster url
channel_ref channel getted from rest service of async-dataflow-channel-sender
channel_secret token getted from rest service of async-dataflow-channel-sender
heartbeat_interval time in milliseconds to verify socket connection this parameter must be less than the socket_idle_timeout on the channel sender 750
enable_binary_transport boolean parameter to indicate use binary protocol false
client.listenEvent("event.some-name", message => someCallback(message.payload));

How can I help?

Review the issues. Read how Contributing.

About

Transport client for async dataflow implementation for browsers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •