Have ideas to improve npm?Join in the discussion! »

    rabbithttp

    0.0.5 • Public • Published

    This module can be used to edit contents of amqp queue like delete,adding element at particular position,search by element,search by position etc

    note: queue should exist before using module

    Example:

    installation

    npm install rabbithttp

    usage

                var sample = require('rabbithttp');
    	var obj=sample.create('localhost'); 
    
    	//number: number of elements to display
    	obj.display(number,queuename,function(err,data){console.log(data)});
    	
                
                //returns: queue size
                obj.size(queuename,function(err,data){console.log(data)});
    
    
                //returns: message
                obj.readFirst(queuename,function(err,message){console.log(message)});
    
    
                //returns: message
                obj.deleteFirst(queuename,function(err,message){console.log(message)});
    
    
                //element: message to be searched
                //flag: false for search and remove, true for only search
                //returns: position of element, if not found then -1 
                obj.search(element,flag,queuename,function(err,message){console.log(message)});	
    
    	        
                //position: position of element
                //flag: false for search and remove, true for only search
                //returns: element in that position, if position > size then "out of bound" error 
                obj.searchposition(position,flag,queuename,function(err,message){console.log(message)});	
    	
    
    
                //position: starts with 0,1,2... like array
                //returns: position
                obj.add(element,position,queuename,function(err,retval){console.log(retval);});
    	
         
                //returns: true 
               	obj.deleteall(queuename,function(err,mess){console.log(mess);});

    Keywords

    Install

    npm i rabbithttp

    DownloadsWeekly Downloads

    11

    Version

    0.0.5

    License

    none

    Last publish

    Collaborators

    • avatar