Giter Site home page Giter Site logo

mqmetric - example needed about mq-golang HOT 1 CLOSED

matsta avatar matsta commented on May 22, 2024
mqmetric - example needed

from mq-golang.

Comments (1)

ibmmqmet avatar ibmmqmet commented on May 22, 2024

Thanks for the comment.

In MQ, there are two ways of getting the current queue depth, both of which can be extrapolated from examples already in the Go source code. Neither do exactly what you want directly, but if you understand the general MQ API or how PCF operations work, then you can use those pieces as starting points.

  1. MQINQ: in mqitest.go, there's code showing how MQINQ is called. The particular example code is opening the qmgr object and getting the qmgr name and a couple of other attributes. For qdepth, you would open a queue object and build a suitable selector array.

  2. PCF is the more general interface for administration, as MQINQ can only return a small number of attributes for an object. In mqmetric/discover.go there's code showing how to make a PCF query, get a response and parse it. The code here is doing INQUIRE_Q_NAMES, but could just as easily be INQUIRE_Q_STATUS to get the depth.

What I'm hoping is that people can read the MQ documentation, for example on PCF programming, and use that general material as the basis of any further PCF operations using the Go interface. The principles don't change, only the detailed spelling for each operation and its parameters.

The mqmetric package is not the right place to add more general admin code; I intended that specifically to work with the published resource statistics. But I might consider adding fragments to another package or perhaps as simple commands (or _test functions) later; and of course there's always the opportunity for other people to contribute examples if they want.

from mq-golang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.