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
Get ORA-25263 while dequeue with message ID #201
Comments
Can you also share the enqueue code details to see if any setting
could cause this issue ?
ex:
```
inventoryqueue, err := godror.NewQueue
...
sendmsg := godror.Message{Object: obj}
sendmsg.Expiration = 10000
inventoryqueue.Enqueue(sendmsgs)
...
```
…On Fri, Dec 3, 2021 at 2:32 PM eugene-vodyanko ***@***.***> wrote:
*Describe the bug*
Get ORA-25263 when try dequeue message with message ID dequeue option.
*To Reproduce*
package main
import (
"context"
"database/sql"
"fmt"
"github.com/godror/godror"
)
func main() {
var (
dbQueue = "TEST_EVENT"
)
db, err := sql.Open("godror", `user="user" password="password" connectString="db.db" libDir="D:/app/user/product/11.2.0/client_4"`)
if err != nil {
panic(err)
}
ctx := context.Background()
err = transaction(ctx, db, dbQueue)
if err != nil {
panic(err)
}
}
func transaction(ctx context.Context, db *sql.DB, dbQueue string) error {
tx, err := db.BeginTx(ctx, nil)
if err != nil {
return err
}
q, err := godror.NewQueue(ctx, tx, dbQueue, "SYS.AQ$_JMS_MESSAGE")
if err != nil {
return err
}
opts, _ := q.DeqOptions()
opts.Mode = godror.DeqBrowse
opts.MsgID = "7BA3FC69817C6F60E0540208202FCAE4"
err = q.SetDeqOptions(opts)
if err != nil {
return err
}
msgs := make([]godror.Message, 1)
n, err := q.Dequeue(msgs)
if err != nil {
return err
}
for _, m := range msgs[:n] {
fmt.Printf("Got message %+v\n", m.MsgID)
err = m.Object.Close()
if err != nil {
return err
}
}
return tx.Commit()
}
*Expected behavior*
Get existing message with same identifier.
*Error output*
panic: dequeue: ORA-25263 no message in queue TEST_EVENT with message ID
0000000000000000000000000000000000000000000000000000000043414534
goroutine 1 [running]:
main.main()
D:/work/go/app-go/cmd/app-go/main.go:23 +0x7f
Process finished with the exit code 2
*Your oracle client version*
11.2.0.4
*Your godror version*
1.14
*Your go version*
1.17
*Machine (please complete the following information):*
- OS: win
- Architecture: x86_64
- Version: 10
Maybe, you have recommendations or instructions?
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#201>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRPMOWQVJ5LMN5ZU46YLGDUPCBUFANCNFSM5JJFTDWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Can you also share the enqueue code details to see if any setting |
Yes it would help if you can share details or if it could be reproduced in
standalone go example.
ORA-25263 is mostly because the message is not present the queue with
message id which is provided in dequeue options.
Also are you able to read it from DB through sqlplus client (select query
from user.queuetable)?
…On Fri, Dec 3, 2021 at 6:20 PM eugene-vodyanko ***@***.***> wrote:
*Can you also share the enqueue code details to see if any setting*
Hi!
The enqueue work is carried out by another application on PL/SQL via API
by package DBMS_AQ (dbms_aq.enqueue).
If it helps I can give an example of this on Pl/SQL...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#201 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRPMOXYPRMSJ64B5BR4SELUPC4KZANCNFSM5JJFTDWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Below is PL/SQL block for enqueue and "select 1" to verify the existence of:
But in go program:
I modestly assume that the problem is in the area of converting a string to RAW... |
96b2c5e says "ORA-25263: no message in queue TEST.TEST_Q wit |
Thanks for your answers. |
I don't know. Without msgID, the dequeueing works. |
Nevertheless, thank you for your time. P.S. This problem is a bit upsetting. Since this is a fairly common way of working with a queue - when we read messages in a selector with a special selection condition without deleting and then we send a message with a specific identifier for processing. |
Thanks for sharing details. we are checking it. |
Describe the bug
Get ORA-25263 (no message in queue) when try dequeue message with message ID dequeue option.
To Reproduce
Expected behavior
Get existing message with same identifier.
Error output
Your oracle client version
11.2.0.4
Your godror version
1.14
Your go version
1.17
Machine (please complete the following information):
Maybe, you have recommendations or instructions?
Thanks!
The text was updated successfully, but these errors were encountered: