I am using the Oracle Java interface for AQ and want to dequeue messages. These messages consist out of two fields:
- A unique row id.
- A non-unique id.
I successfully decoded messages using a single RAW payload like this:
AQDequeueOption option = new AQDequeueOption();
option.setDequeueMode(AQDequeueOption.DEQUEUE_REMOVE);
AQMessage message = queue.dequeue(option);
RAW raw = new RAW(message.getRawPayload().getBytes());
Integer rowId = Integer.valueOf(raw.stringValue());
I remember reading sth. along the lines that custom types are not supported in the Java interface. Is that so? How would the correspondent AQQueueTableProperty
call look like or do I need to create the queue and queue table in SQL? Can't the result of the dequeue operation be mapped to a Java representation using the usual JDBC ResultSet
operations?