code: function setup(connection) {
  
                  node.connection = connection;
  
                  // node connected
                  node.status({ fill: 'green', shape: 'dot', text: 'connected' });
  
                  // build receiver options based on node configuration
                  var options = {
                      source: {
                          address: node.address,
                          dynamic: node.dynamic,
                          durable: node.durable,
                          expiry_policy: node.expirypolicy
                       },
                      credit_window: node.creditwindow,
                      autoaccept: node.autoaccept,
                      snd_settle_mode: node.sndsettlemode,
                      rcv_settle_mode: node.rcvsettlemode
                  };
  
                  node.receiver = node.connection.open_receiver(options);
  
                  node.receiver.on('message', function(context) {
                      var msg = {
                          payload: context.message,
                          delivery: 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) {
                      if (msg.credit) {
                          node.receiver.flow(msg.credit);
                      }
                  });
  
                  node.on('close', function() {
                      if (node.receiver != null)
                          node.receiver.detach();
                      node.connection.close();
                  });
              }
docs: Node setup for creating receiver link
  
  @param connection    Connection instance