Working with the Natural Interface for Messaging

This section provides information on various operational aspects of Natural Messaging:


Invoking Natural Messaging

If the Natural interface for messaging is available, the license check is performed when you start a Natural session. Buffers for Natural Messaging are allocated when the first message access takes place.

Communication between Natural and Messaging Systems

Accessing messaging systems from Natural works similarly to accessing a database. The Natural Messaging product is delivered with a predefined DDM called MQ-QUEUE (see Natural Statements and View Description with Natural Messaging). The Natural PROCESS statement is used to get messages from a message queue or to put messages on a message queue. The FIND statement can be used to browse a message queue.

Natural handles all required calls to the messaging system internally (for example, connecting to a queue manager or opening a queue).

Buffers for Memory Management

Buffers for Natural Messaging calls are only allocated in the Natural thread when necessary. The payload of a message may become quite large. The predefined DDM MQ-QUEUE contains the MESSAGE field, which contains the payload. Multiple length options are provided (for example, MESSAGE-10K and MESSAGE-100K). Select the field that is suitable for your application. You must ensure that the selected MESSAGE field fits in your Natural thread.