Input and output messages

The Message class is an object-oriented construct that enables you to send your data through IBM® Spectrum Symphony to your client or service.

To send custom input and output messages, the Message object must be extended and the onSerialize( ) and onDeserialize( ) methods implemented.

The IBM Spectrum Symphony API follows object-oriented principles to allow your data to be logically encapsulated.

Input messages

Any input to the service that does not fall under the category of common data is referred to as an input message.

An input message must be sent to invoke your service. Each input message corresponds to one service invocation.

You can determine the scope of an input message retrieved by the ServiceContainer by accessing the input message during the execution of onInvoke( ) on the ServiceContainer.

Lifetime of an input message

The input message sent from the client cannot be deleted until sendTaskInput( ) on the session returns successfully.

If you have a recoverable session, once sendTaskInput( ) returns successfully, the input message is kept in the system until output is successfully retrieved for the task. If you do not retrieve output successfully, the message is kept in the system until the session is closed or aborted.

If you have a nonrecoverable session, if the session manager fails or the system goes down, you must keep your input message and resend it, or create a new session and resend. You will not be able to recover input or output.

Output messages

The result of a service computation to be sent back to the client is referred to as an output message.

Lifetime of an output message

The output message sent from the service cannot be deleted until setOutputMessage( ) on the TaskContext returns successfully.