Transportation

To communicate with other nodes (ServiceBrokers), every node has a transportation layer. You can use several adapters.

REDIS Transporter

    const ServiceBroker = require('@weave-js/core')
    const adapters = require('@weave-js/core/adapters')

    const broker = ServiceBroker({
        nodeId: 'node-1'
        transport: adapters.Redis(),
    })

    broker.start()

Custom settings

The REDIS transport adapter uses the ioredis module. You can pass the options from the module.

    const broker = ServiceBroker({
        nodeId: 'node-1'
        transport: adapters.Redis({
            port: 6379,
            host: '127.0.0.1'
        }),
    })

TCP Transporter

    // todo