Home | Previous Page | Next Page   MQ DataBlade Module > MQ DataBlade Tables > Working with Tables > 3 3 3

Special Considerations

3

Binding a table to a queue creates a useful interface 3between the queue and the database. However, due to the inherent 3limitations of a queue, not all database functionality can be used.

3

When a message is fetched from a queue, the default database 3processing is to dequeue, or remove, it. Every time a queue is read 3by the database, the data within the queue changes. This behavior 3differs from a standard read by a database, in which the data does 3not change. Supplying only a mapping that enables users to browse, 3where reading does not remove the queue, eliminates a major queue 3functionality. Enabling both processing models provides more options 3and requires corresponding responsibility.

3

By default, the top element is removed when a message is fetched 3from a queue. WMQ allows messages to be retrieved based upon a correlid. 3A correlid is a correlation identifier 3that can be used as a key, for example, to correlate a response 3message to a request message. If the correlid of 3the message matches the correlid of a request, 3the message is returned. If the VTI table is qualified with the correlid column, 3the correlid qualifier is passed into the 3WMQ request to fetch a value.

3

In the following example, a queue has three messages and only 3the second message contains a correlid, 3which is named 'fred'. The 3following statement removes all three messages from the queue and 3places them in a table named flounder:

3

3
INSERT into flounder (deQueuedMsg) values (SELECT msg from vtimq);
3

When execution completes, no messages remain on the queue and 3three new rows appear in the flounder table.

3

The following example qualifies the vtimq table:

3

3
INSERT into flounder (deQueuedMsg) values (SELECT msg from vtimq where
3correlid = 'fred');
3

The above statement creates two groups of messages: 3

3 3

Statements including qualifiers other than equality (=) or NULL 3return an error. Statements including NULL return unexpected results.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]