AsyncNotification with OracleQueue in 4.20

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
tradel
Posts: 3
Joined: Tue 25 Sep 2007 02:24

AsyncNotification with OracleQueue in 4.20

Post by tradel » Tue 25 Sep 2007 02:29

Are there any examples of how to use the new async notification feature in 4.20? I have tried the following code:

Code: Select all

            _conn = new OracleConnection();
            _conn.UserId = "xxx";
            _conn.Password = "yyy";
            _conn.Server = "zzz";
            _conn.Open();

            _queue = new OracleQueue("REQUEST_QUEUE", _conn);
            _queue.DequeueOptions.ConsumerName = "abc";
            _queue.DequeueOptions.WaitTimeout = 0;
            _queue.DequeueOptions.DequeueMode = OracleQueueDequeueMode.Locked;
            _queue.AsyncNotification = true;
            _queue.OnMessage += new OracleQueueMessageEventHandler(_queue_OnMessage);
I get the error ORA-25257: consumer must be specified with a multi-consumer queue even though I have specified the ConsumerName property.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 25 Sep 2007 10:24

We are investigating this problem.
Look forward to hearing from us soon.

tradel
Posts: 3
Joined: Tue 25 Sep 2007 02:24

Post by tradel » Tue 25 Sep 2007 13:04

In the meantime, can you confirm my code is correct? There don't seem to be any code samples for async notification. In fact, it isn't even mentioned in the help.

Also, are there any samples for using QueueAgents and the Listen() method?

We are trying to evaluate OraDirect.NET for a site license and your answers will be very helpful.

Thanks.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 25 Sep 2007 14:07

In the meantime, can you confirm my code is correct? There don't seem to be any code samples for async notification. In fact, it isn't even mentioned in the help.
Your code is correct. We have already found the bug.
Also, are there any samples for using QueueAgents and the Listen() method?
There no, unfortunately. Our implementation of Listen() method is identical to Oracle's Listen(). We just invoke native method with needed parameters. I suggest you consulting Oracle documentation.

tradel
Posts: 3
Joined: Tue 25 Sep 2007 02:24

Post by tradel » Tue 25 Sep 2007 15:50

For my own information, are you using the AQ classes from Mono? Some of your classes and enums seem to be identical.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 26 Sep 2007 09:56

No, we are not.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 26 Sep 2007 11:52

The problem is fixed. Look forward to the next build.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 30 Oct 2007 16:48

Please try new version of OraDirect .NET 4.25.

Post Reply