AsyncNotification with OracleQueue in 4.20
Posted: 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:
I get the error ORA-25257: consumer must be specified with a multi-consumer queue even though I have specified the ConsumerName property.
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);