-

Topic count on javascript client

Comments

4 comments

  • Official comment
    Peter Hughes

    Hi Mike,

    The ability to get a count of child topics under a specific root is functionality specific to the Introspector; I'm afraid that there's no general-purpose means for you to subscribe to this information from other clients.

    If you require more granular topic statistics, you can enable statistics in your server configuration:

    Statistics Configuration Documentation

    These are reported on topics which may be subscribed to by the Javascript client. However, these statistics don't include all the information provided by the Introspector (i.e number of child topics).

    Are there any specific details that you wish to observe from the JS client?

    Comment actions Permalink
  • Michael Guelpa

    Hi Peter.

    Thanks for getting back to me. Our topic count is always changing and I have built a simple monitor that shows us our current user count / topic count / memory usage etc.

    Our root topic is "A" for example
    "B" would be events

    I'd like to know the following:
    Total amount of topics under "A"
    How many of topic "B" under "A"
    For each "B" how many "C" topics are there etc etc

    We have used stats before but we're currently logging at finest due to an issue and it massively inflated the topic tree causing us some problems so unfortunately at present I can't enable monitor-topics etc.

    Thanks

    0
    Comment actions Permalink
  • Lee

    Hi Mike,

    Unfortunately there isn't a function built into Diffusion that can do this. You will need to implement a custom solution to achieve the desired result.

    A possible solution could be to implement a counting system when adding a topic and publishing this information on a different topic.

    0
    Comment actions Permalink
  • Michael Guelpa

    Hi Lee,

    That's no problem I'll look into how else I can do this.

    Thanks for your help.
    Mike

    0
    Comment actions Permalink

Please sign in to leave a comment.