-
Notifications
You must be signed in to change notification settings - Fork 43
Support AQ #186
Comments
https://docs.oracle.com/cd/B14117_01/server.101/b10785/jm_exmpl.htm shows it with pl/sql.
Show what you have, and I will try to help.
On Wed, Jul 31, 2019 at 7:05 AM +0200, "sinys15" <[email protected]> wrote:
Could you please provide some functions for comfort work with Advanced Queue in Go?
I'm interested in UDT and SYS.AQ$_JMS_TEXT_MESSAGE (for move Java project to Go) data types.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@sinys15 There is an example of PL/SQL usage in the context of node-oracledb at: https://github.com/oracle/node-oracledb/blob/v3.1.2/doc/api.md#aq @tgulacsi we recently added native support to node-oracledb 4: https://oracle.github.io/node-oracledb/doc/api.html#aq and updated the AQ API in cx_Oracle to match: https://cx-oracle.readthedocs.io/en/latest/aq.html Yell out if you want to talk about the implementation. |
The part is showing enqueue example for sys.aq$_jms_text_message: The part is showing dequeue example for sys.aq$_jms_bytes_message (not the same sys.aq$_jms_text_message but just show the example): @cjbj
Enqueue and Dequeue will be enough, Queue Subscribers is not in priority. |
@tgulacsi I just want to note several moments: |
It is what the underlying ODPI-C exposes.
As I don't have too much free time right now, the "queue" branch contains a "proposal". |
In dbms_aq it looks like FOREVER_UNLESS_SHUTDOWN - undocumented, support is not required |
Regarding constants, search for "AQ" and "advanced queuing" in https://github.com/oracle/odpi/blob/master/include/dpi.h |
result is -1 but in your links it is it looks like just big value in seconds, it is not original -1 value, but of course it will work and looks like wait infinity (not really). |
That FOREVER is uint32(-1) = uint32(0) - 1 = 2^32 - 1 = 4294967295 because it cycles from 0 to the max number. Either way, a big number is just perfect for waiting forever... |
I see but is this parameter uint32 data type or why it can't be honest int32 = -1? |
7b411ab passes the simple TestQueue test in |
Looks good! But what about more complicated data types?
To more complicated sys.aq$_jms_text_message data type with methods. I don't know how to work with Object Types with goracle. |
They're there, just not tested thoroughly yet. See TestObject... tests!
On Wed, Aug 7, 2019 at 6:22 AM +0200, "sinys15" <[email protected]> wrote:
Looks good! But what about more complicated data types?
From simple
create or replace type MY_ARRAY AS TABLE OF varchar2(1000)
/
create or replace type MY_STRUCT AS OBJECT (
Field_NUM number,
Field_VCHR varchar2(100),
Field_ARR MY_ARRAY
)
/
...
DBMS_AQADM.CREATE_QUEUE_TABLE(queue_table => 'MY_QUEUE_TABLE', queue_payload_type => 'MY_STRUCT');
...
To more complicated sys.aq$_jms_text_message data type with methods.
I don't know how to work with Object Types with goracle.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I've started a TestQueueObject test, but
|
I'd love to get some help from @anthony-tuininga or @cjbj - I don't know what am I doing wrong. Get the object type, create an object, fill its arguments, then Enqueue a message:
With DPI_LOG_LEVEL=28:
|
Ok, that was a strange error: the object's F_vc20 was filled with more than its length, and that materialized in such an error. Fixing that, the object is queued successfully! |
Hi,
Could you please provide some functions for comfort work with Advanced Queue in Go?
I'm interested in UDT (User Defined Type) and SYS.AQ$_JMS_TEXT_MESSAGE (for move Java project to Go) data types.
The text was updated successfully, but these errors were encountered: