rhea/rhea.js
function setup(connection) {

                node.connection = connection;

                // node connected
                node.status({ fill: 'green', shape: 'dot', text: 'connected' });

                // build sender options based on node configuration
                var options = {
                    target: {
                        address: node.address,
                        dynamic: node.dynamic,
                        durable: node.durable,
                        expiry_policy: node.expirypolicy
                    },
                    autosettle: node.autosettle,
                    snd_settle_mode: node.sndsettlemode,
                    rcv_settle_mode: node.rcvsettlemode
                };
                node.sender = node.connection.open_sender(options);

                node.sender.on('accepted', function(context) {
                    var msg = outDelivery(node, context.delivery);
                    node.send(msg);
                });

                node.sender.on('released', function(context) {
                    var msg = outDelivery(node, context.delivery);
                    node.send(msg);
                });

                node.sender.on('rejected', function(context) {
                    var msg = outDelivery(node, context.delivery);
                    node.send(msg);
                });

                node.connection.on('disconnected', function(context) {
                    // node disconnected
                    node.status({fill: 'red', shape: 'dot', text: 'disconnected' });
                });

                node.on('input', function(msg) {
                    // enough credits to send
                    if (node.sender.sendable()) {
                        node.sender.send(msg.payload);
                    }
                });

                node.on('close', function() {
                    if (node.sender != null)
                        node.sender.detach();
                    node.connection.close();
                });
            }
function setup(connection) {

                node.connection = connection;

                // node connected
                node.status({ fill: 'green', shape: 'dot', text: 'connected' });

                // build sender options based on node configuration
                var options = {
                    target: {
                        address: node.address,
                        dynamic: node.dynamic,
                        durable: node.durable,
                        expiry_policy: node.expirypolicy
                    },
                    autosettle: node.autosettle,
                    snd_settle_mode: node.sndsettlemode,
                    rcv_settle_mode: node.rcvsettlemode
                };
                node.sender = node.connection.open_sender(options);

                node.sender.on('accepted', function(context) {
                    var msg = outDelivery(node, context.delivery);
                    node.send(msg);
                });

                node.sender.on('released', function(context) {
                    var msg = outDelivery(node, context.delivery);
                    node.send(msg);
                });

                node.sender.on('rejected', function(context) {
                    var msg = outDelivery(node, context.delivery);
                    node.send(msg);
                });

                node.connection.on('disconnected', function(context) {
                    // node disconnected
                    node.status({fill: 'red', shape: 'dot', text: 'disconnected' });
                });

                node.on('input', function(msg) {
                    // enough credits to send
                    if (node.sender.sendable()) {
                        node.sender.send(msg.payload);
                    }
                });

                node.on('close', function() {
                    if (node.sender != null)
                        node.sender.detach();
                    node.connection.close();
                });
            }
function setup ( connection ) { node . connection = connection ; // node connected node . status ( { fill : 'green' , shape : 'dot' , text : 'connected' } ) ; // build sender options based on node configuration var options = { target : { address : node . address , dynamic : node . dynamic , durable : node . durable , expiry_policy : node . expirypolicy } , autosettle : node . autosettle , snd_settle_mode : node . sndsettlemode , rcv_settle_mode : node . rcvsettlemode } ; node . sender = node . connection . open_sender ( options ) ; node . sender . on ( 'accepted' , function ( context ) { var msg = outDelivery ( node , context . delivery ) ; node . send ( msg ) ; } ) ; node . sender . on ( 'released' , function ( context ) { var msg = outDelivery ( node , context . delivery ) ; node . send ( msg ) ; } ) ; node . sender . on ( 'rejected' , function ( context ) { var msg = outDelivery ( node , context . delivery ) ; node . send ( msg ) ; } ) ; node . connection . on ( 'disconnected' , function ( context ) { // node disconnected node . status ( { fill : 'red' , shape : 'dot' , text : 'disconnected' } ) ; } ) ; node . on ( 'input' , function ( msg ) { // enough credits to send if ( node . sender . sendable ( ) ) { node . sender . send ( msg . payload ) ; } } ) ; node . on ( 'close' , function ( ) { if ( node . sender != null ) node . sender . detach ( ) ; node . connection . close ( ) ; } ) ; }
Node setup for creating sender link

@param connection    Connection instance
Node setup for creating sender link