-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Advanced Queueing Support in Thin Mode #437
Comments
Work has been in progress on this front for the past number of weeks. I can't say which version will contain this support yet, but once it is available for testing I will let you know! |
@mxdev88 what specific AQ functionality are you using? E.g. array enq/deq, recipient lists, what kind of payload(s) (RAW, JSON), etc? |
Initially on the consumer side and using deqone / deqmany with RAW payload. |
I'm also excited to have AQ in thin mode, thank you for working on it. So far I am using object payloads and RAW payloads. I would love to use JSON payloads but don't have the latest Oracle version that supports this. I use single consumer queues, single enqueues and single dequeues. No agents, No recipient lists. I think in the future array enqueue and dequeue would be important. I also set enqueue options and dequeue options. |
Would you please explain what the cost is by using AQ in thin mode in the following manner, compared to using thick mode's native AQ support? My guess is that this work around requires twice as much network IO compared to the thick mode's native AQ support.
My guess is that this results in twice as much network IO as compared to using native AQ in thick mode. This thin-mode workaround will need to invoke an IO from the application server to Oracle, and then when Oracle has a new event, it will send it back over the same IO channel, for a total of two IO's per message. With Native AQ in thick mode, I would guess that a socket is opened when the queue is created. Then the application server can go to sleep listening to the local socket. When Oracle gets a new message, it pipes it over the network to this socket, at which point the application server wakes up and reads it. So a total of one IO per message. Is that right? |
I am sure there is some overhead in calling PL/SQL as opposed to using AQ natively, but I don't think it is quite as bad as you think. When you call If you want to know for sure what the overhead is, you can try with thick mode -- both natively and with PL/SQL and see what the difference in performance is. |
@mkmoisen I don't want to get you too excited but it seems our next release (version 3.0) will have our (initial) Thin mode AQ support, since we just merged into our internal repo. @shivani-ka and her team have been working hard on this, and will continue adding functionality in future versions too. The code is not on GitHub as I type, but could be soon. The release notes say: "Added Oracle Advanced Queuing support for single enqueue and dequeue of RAW and Oracle object payload types." The fine print is that this initial Thin mode support is for classic queues (not transactional event queues). Also JSON and JMS payloads, array message queuing and dequeuing operations, and Recipient Lists are only supported in python-oracledb Thick mode in this version. As to release timing, we have a few non-AQ features close to being ready to land, and a lot of testing to do. |
@cjbj very glad to hear it. My application may be able to use it, since it uses classic queues, single dequeues, with oracle object payloads. Thank you guys! |
@cjbj Do you know in which Oracle version "transactional event queues" was released? The only documentation I can find for it is Oracle 21: https://docs.oracle.com/en/database/oracle/oracle-database/21/adque/index.html The Oracle 19 documentation does not refer to "transactional event queues": https://docs.oracle.com/en/database/oracle/oracle-database/19/adque/index.html However this blog post claims that transactional event queues were released in 19: |
Oracle object payload types (#437).
I have pushed a patch that partially implements this enhancement (note restrictions above) and have initated a build from which you can download pre-built development wheels once it completes. You can also build from source if you prefer. If you can test your scenario and provide feedback before the release, that would be appreciated! |
How may I download a pre-built dev wheel? For example under Artifact download URL: https://github.com/oracle/python-oracledb/actions/runs/13333204363/artifacts/2593722184 However I'm getting a 404 on github, not sure if it is public or not. Thanks. |
Go here: https://github.com/oracle/python-oracledb/actions/runs/13333204363 and then click the "python-oracledb-wheels" link at the bottom under artifacts. This link: https://github.com/oracle/python-oracledb/actions/runs/13333204363/artifacts/2595043763 It is possible that you tried while the builds were ongoing. The separate wheels are built and then combined into a single artifact at the end! |
I have installed it on local but I am receiving this error when calling
I'm using Oracle Database 19. I'll create a script to minimally reproduce this and report back. |
I'm using:
Here is how I made my queue in Oracle:
Here is how I am calling in Python:
Here is the error I'm getting while calling
It works fine in thick mode. Thank you. |
@mkmoisen I am looking into this and will update once I have findings. |
@cjbj @anthony-tuininga @shivani-ka I've tried the new patch and it appears to be working smoothly on my local. Thanks! |
The documentation specifies that Advanced Queueing (AQ) is only supported in thick mode. The request is to add support to thin mode to be able to use asynchronous operations within the same application, which are not possible in thick mode.
The text was updated successfully, but these errors were encountered: