AMI publish/subscribe functions

The AMI publish/subscribe functions are:

Publish command

C high-level
amPublish
C object-level
amPubPublish
C++
AmPublisher->publish
Java(TM)
AmPublisher.publish

Register Subscriber command

C high-level
amSubscribe
C object-level
amSubSubscribe
C++
AmSubscriber->subscribe
Java
AmSubscriber.subscribe

Deregister Subscriber command

C high-level
amUnsubscribe
C object-level
amSubUnsubscribe
C++
AmSubscriber->unsubscribe
Java
AmSubscriber.unsubscribe

Receive a publication

C high-level
amReceivePublication
C object-level
amSubReceive
C++
AmSubscriber->receive
Java
AmSubscriber.receive

These functions have parameters that enable you to specify some of the parameters in the command message, such as the topic. Other parameters in the command message are specified by the AMI service that you use to send the message (the service is set up by the system administrator). You can modify these parameters by changing the appropriate name/value elements before sending the command message; helper functions are provided for this purpose. Details of these name/value elements and the options that are available for each command are given in Publish/Subscribe command messages.

There are no AMI functions to generate Delete Publication, Deregister Publisher, Register Publisher, or Request Update command messages directly. You have to construct a message containing the appropriate name/value elements using the helper functions provided, and then send the message to the broker.

Refer to the WebSphere MQ Application Messaging Interface book for details of how to use the functions mentioned above (including the name/value element helper functions).