Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

How to call serviceBusService.listTopics(function(err, listtopicsresult, response){})?

$
0
0

Hello,

I'm trying to list all the topics in service bus with name and size. In my code:-

var AZURE = require('azure');
var serviceBusService = AZURE.createServiceBusService();

function ListTopic()
{
    serviceBusService.listTopics(function(err, listtopicsresult, response){
        if(!err)
        {
            console.log("err  ok");
        }
        else
        {
            console.log("err error: "+err);
        }

        if(listtopicsresult)
        {

I get something here in listtopicsresult can't get the actual list with topic name 

            //console.log("listtopicsresult 0 "+listtopicsresult.getItem(0));
            //console.log("listtopicsresult size "+listtopicsresult.size);
            //console.log("listtopicsresult size "+listtopicsresult.size);
            //console.log("listtopicsresult index 0 "+listtopicsresult.indexOf(0));
            //console.log("listtopicsresult index 0 "+listtopicsresult.indexOf(1));


        }
        else
        {
            console.log("listtopicsresult error: "+listtopicsresult);
        }

        if(!response)
        {
            console.log("response  ok");
        }
        else
        {
            console.log("response error: "+response);
        }
    });
}

How do I get all topic size and with name? First I wanted make this call work. Perhaps then I could try to find out each topic  size. Wish someone could help me in this matter. Thanks in advance!


Do it now! - Today will be yesterday tomorrow MadSum



Viewing all articles
Browse latest Browse all 1916

Trending Articles