Sun Java System Message Queue 4.3 Developer's Guide for C Clients

MQStartConnection

The MQStartConnection function starts the specified connection to the broker and starts or resumes message delivery.


MQStartConnection
             (const MQConnectionHandle connectionHandle);

Return Value

MQStatus. See the MQStatusIsError() function for more information.

Parameters

connectionHandle

The handle to the connection that you want to start. This handle is the handle that is created and passed back to you by the MQCreateConnection() function.

When a connection is created it is in stopped mode. Until you call this function, messages are not delivered to any consumers. Call this function to start a connection or to restart a connection that has been stopped with the MQStopConnection() function. To create an asynchronous consumer, you could have the connection in stopped mode, and start or restart the connection after you have set up the asynchronous message consumer.

Use the MQCloseConnection() function to close a connection, and then use the MQFreeConnection() function to free the memory allocated to the connection.

Common Errors

MQ_BROKER_CONNECTION_CLOSED