0

I have been searching over the internet past few days for any running sample implementation of Oracle Adavanced Queue for enque/deque of messages, but haven't had any success.

I was trying to follow the specification mentioned oracle documentation on this, but it's little unclear to me.

  • It doesn't have any information about the dependencies to use (maven/gradle) available publicly. [I came to know that I need to use aqapi.jar] . Any specific version compatible with the jdbc driver I am using.

  • I am also using c3p0 connection pooling for this and looking for any support of AQSession out of the box for the c3p0 to avoid connection and session handling from code perspective.

Note: The queue table and the queue is already setup from the database layer. I am just trying to write a producer/consumer to message delegation. we are using oracle 12c and Java 11.

Any sort of information would be really appreciated.

Samar
  • 69
  • 1
  • 1
  • 5

1 Answers1

1

All you need is the Oracle JDBC thin driver (ojdbc) to do AQ operations such as enqueue or dequeue. See the Oracle JDBC Javadoc for more details about the APIs. Please also checkout this other question on stackoverflow for some code samples: How to enqueue on Oracle AQ table on commit with Java and consume with a JMS client

Note you have two options: a) either use the AQ APIs directly or b) use AQ-JMS if you want to use the JMS APIs instead.

aqapi.jar is only needed for admin purposes like "create a queue", "start a queue", etc. Otherwise you don't need it.

Jean de Lavarene
  • 3,461
  • 1
  • 20
  • 28
  • Thanks Jean for the tip. I would really like to use the JDBC provided AQ APIs (No AQ-JMS). The enqueue and dequeue APIs doesn't say anything on the batch queueing and dequeueing. Doing one by one queueing and dequeueing would slow down performance quite drastically. – Samar Mar 30 '20 at 22:35
  • You'll get batch enqueue & dequeue through JDBC APIs in the next version of ojdbc. It's not yet released. – Jean de Lavarene Mar 31 '20 at 16:48