Name service interface

A name service provides entry points for use by the queue manager.

The following entry points are provided:

    MQZ_INIT_NAME
    Initialize the name service component.

    MQZ_TERM_NAME
    Terminate the name service component.

    MQZ_LOOKUP_NAME
    Look up the queue manager name for the specified queue.

    MQZ_INSERT_NAME
    Insert an entry containing the owning queue manager name for the specified queue into the directory used by the service.

    MQZ_DELETE_NAME
    Delete the entry for the specified queue from the directory used by the service.

If there is more than one name service configured:

  • For lookup, the MQZ_LOOKUP_NAME function is invoked for each service in the list until the queue name is resolved (unless any component indicates that the search should stop).
  • For insert, the MQZ_INSERT_NAME function is invoked for the first service in the list that supports this function.
  • For delete, the MQZ_DELETE_NAME function is invoked for the first service in the list that supports this function.

Do not have more than one component that supports the insert and delete functions. However, a component that only supports lookup is feasible, and could be used, for example, as the last component in the list to resolve any name that is not known by any other name service component to a queue manager at which the name can be defined.

In the C programming language the names are defined as function data types using the typedef statement. These can be used to prototype the service functions, to ensure that the parameters are correct.

The header file that contains all the material specific to installable services is cmqzc.h for the C language.

Apart from the initialization function (MQZ_INIT_NAME), which must be the component's main entry point, functions are invoked by the entry point address that the initialization function has added, using the MQZEP call.

Parent topic: Writing a service component