To write data to a queue, the queue must be both created and started. The following SQL script creates a queue with a JSON payload type.
We’ll dequeue the message and print it to the console.
The following snippet creates a topic using the Kafka API for Transactional Event Queues:
The following Java snippet creates an org.oracle.okafka.clients.producer.KafkaProducer instance capable of producing data to Transactional Event Queue topics.
The following Java snippet creates an org.oracle.okafka.clients.consumer.KafkaConsumer instance capable of records from Transactional Event Queue topics.
JMS (Java Message Service) provides a standard way to enqueue and dequeue messages. This section shows how to use plain Java JMS APIs and Spring JMS integration.
When enqueuing a message, you can specify an expiration time using the expiration attribute of the message_properties object.
When enqueuing a message, you can specify a delay (in seconds) before the message becomes available for dequeuing.
When enqueuing a message, you can specify its priority using the priority attribute of the message_properties object.
Messages that exceed their expiration time are automatically moved to an exception queue for further processing or inspection.