Page 1 of 1

AsyncNotification with OracleQueue in 4.20

Posted: Tue 25 Sep 2007 02:29
by tradel
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.

Posted: Tue 25 Sep 2007 10:24
by Alexey
We are investigating this problem.
Look forward to hearing from us soon.

Posted: Tue 25 Sep 2007 13:04
by tradel
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.

Posted: Tue 25 Sep 2007 14:07
by Alexey
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.

Posted: Tue 25 Sep 2007 15:50
by tradel
For my own information, are you using the AQ classes from Mono? Some of your classes and enums seem to be identical.

Posted: Wed 26 Sep 2007 09:56
by Alexey
No, we are not.

Posted: Wed 26 Sep 2007 11:52
by Alexey
The problem is fixed. Look forward to the next build.

Posted: Tue 30 Oct 2007 16:48
by Alexey
Please try new version of OraDirect .NET 4.25.