Number of messages received by OraclePipe

Number of messages received by OraclePipe

Postby mannalex » Mon 04 Apr 2011 10:52

Hello,

the OraclePipe.Receive() method returns a collection of messages. My tests showed that there is never more than a single message in it.

Is the internal implementation really built in a way to unpack more than one message?

Regards,
Alex
mannalex
 
Posts: 1
Joined: Mon 04 Apr 2011 10:40

Postby Shalex » Wed 06 Apr 2011 13:13

Thank you for your report. We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
Shalex
Devart Team
 
Posts: 7602
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Wed 13 Apr 2011 12:31

A collection of messages is returned when your send messages to the server as a collection:
Code: Select all
    using (OracleConnection conn = new OracleConnection()) {
        conn.ConnectionString = "server=orcl1120;uid=scott;pwd=tiger;";
        conn.Open();
        OraclePipe pipe = new OraclePipe(conn, "test");
        pipe.SendTimeout = 5;
        OraclePipeMessageCollection coll = new OraclePipeMessageCollection();
        coll.Add(new OraclePipeMessage("hello! 1", OracleDbType.VarChar));
        coll.Add(new OraclePipeMessage("hello! 2", OracleDbType.VarChar));
        coll.Add(new OraclePipeMessage("hello! 3", OracleDbType.VarChar));
        pipe.Send(coll);
    }
    using (OracleConnection conn = new OracleConnection()) {
        conn.ConnectionString = "server=orcl1120;uid=scott;pwd=tiger;";
        conn.Open();
        OraclePipe pipe = new OraclePipe(conn, "test");
        pipe.ReceiveTimeout = 5;
        OraclePipeMessageCollection collection = pipe.Receive();
        for (int i = 0; i < collection.Count; i++) {
            Console.WriteLine(collection[i].Value);
        }
        Console.ReadLine();
    }
Shalex
Devart Team
 
Posts: 7602
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle