Message Service
Messaging constitutes the fundamental transport of messages and infrastructure and classes designed to make certain message paradigms simple.
There are 3 underlying transports to the SAFplus7 messaging layer.
- IOC messaging C API
- This is a thin layer on top of IOC messaging itself and can have multiple transports, TIPC and UDP are currently supported. Applications can create their own message server listening to any IOC port.
- SAFplus messaging.
- All SAFplus components and user applications need an IOC message server to carry all SAFplus library communications. The IOC port involved is well-known for SAFplus services and is either well-known or dynamically assigned for user applications. Since this single port is handling multiple protocols (each SAFplus library speaks with its own protocol) messages are contained within a larger protocol that identifies the contained protocol. It is possible for user applications to register their own sub-protocol and receive notifications when messages arrive. In this manner, applications can take advantage of much of the SAFplus message infrastructure. (In SAFplus 6.1, this capability is called the "EO" -- in SAFplus7, the 6.1 "EO" will not be used).
- SA-Forum Message Queues
- See the Service Availability Forum documentation
Synchronous and Asynchronous
Message receipt can occur either synchronously or asynchronously using the "Wakeable" feature of the SAFplus thread semaphore system.
Classes and Objects
MsgServerI
This is and abstract class defining the interface of a message server. It contains a function to get the address of the server,
- /** Send a message
- @param msgtype The destination message handler @param destination Address of the destination node/process @param buffer Your data @param length Your data length Raises the "Error" Exception if something goes wrong, or if the destination queue does not exist.
- /
void SendMsg(ClIocAddressT destination, void* buffer, ClWordT length,ClWordT msgtype=0);
/** Start the server */ void Start(); /** Stop message processing right away
- Messages waiting in the queue are not dropped
- /
- This function stops accepting new messages right away, but does not return until all enqueued messages have been processed, and all processing threads are stopped.
- / void Quiesce();
void RecvMsg
