You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Adam Kaminiecki <ad...@dgt.com.pl> on 2010/12/06 11:47:47 UTC

QPid .net C# client problem

Hi

MyClient=new MessageListener(session);
MyClient.NewMessagee += new 
MessageListener.NewMessage(MyClient_NewMessagee);
session.ExchangeDeclare(exchange,type,string.Empty,null,Option.NONE);
string myqueue = session.Name;
session.QueueDeclare(myqueue);


Hi, I get an error in last line i this code:
org.apache.qpid.transport.SessionException was unhandled
   
Message="System.Collections.Generic.List`1[org.apache.qpid.transport.ExecutionException]"
   Source="qpid.client"



Can you give me some advice?


And I have few questions more:

When Im creating sessiom why I must declare expiry in seconds?? Its 
timeout for request-response?

Where can I find explanation of patrameters Option??




Is it correct declaration for consumer/message listener or am I doing 
something wrong??

  private class MessageListener:IMessageListener
         {
             private readonly ISession session;

              public MessageListener(ISession sess)
             {
                 session = sess;
             }

             public delegate void NewMessage(IMessage e);
             public event NewMessage NewMessagee;

             public void MessageTransfer(IMessage m)
             {
                 var range = new RangeSet {m.Id};
                 session.MessageAccept(range,null);
                 NewMessagee(m);
             }
         }


Regards,
Adam






-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: QPid .net C# client problem

Posted by Cliff Jansen <cl...@gmail.com>.
On Tue, Dec 7, 2010 at 1:11 AM, Adam Kaminiecki <ad...@dgt.com.pl> wrote:
> What a waste :/  can u tell what I need to download to use
>
>   - The .NET Binding for the C++ Messaging Client
>
> because I dont understant it clearly what I have to do to use it i C#
>
>
>
> Regards,
> Adam

Here is a recent posting on the subject (to a different "Adam")


Re: different versions of .NET clients

Chuck Rolke
Mon, 29 Nov 2010 10:29:19 -0800

Adam,

The .NET Binding is hidden away in the /cpp directory.

Here's a way to build it:

1. Fetch the qpid-0.8.tar.gz (57M) to your system. Say, to D:\qpid

2. Unzip, untar (7zip works great) to D:\qpid. You now have
   D:\qpid\qpid-0.8\cpp\...

3. Run powershell script
   D:\qpid\qpid-0.8\cpp\bindings\qpid\dotnet\configure-windows.ps1

4. This script asks you to identify
   a. The directory that holds 32-bit boost. Navigate to it, single click it,
and click OK.
   b. The new, out-of-source directory in which to run CMake.
      This is the QPID_BUILD_ROOT folder for 32-bit builds.
      Select the parent directory for it (the default 'qpid-0.8' is fine)
      Press 'Make New Folder'
      Type in 'x86' and press OK
   c. Run CMake in the folder you created? Press Yes.

   d. The questions repeat for a 64-bit build. To skip 64-bit builds, press
Cancel.
      For now just press Cancel.

   CMake runs to populate your QPID_BUILD_ROOT with generated sources and
project files

5. Navigate to your QPID_BUILD_ROOT D:\qpid\qpid-0.8\x86

6. Build the qpid-cpp.sln solution. For now, just build Debug, Win32.
   This is a 'regular cpp build'.
   This step produces all the "cpp libraries" that the .NET binding will need.

7. In QPID_BUILD_ROOT execute the procedure
start-devenv-messaging-x86-32bit.bat.
   This step launches the .NET Binding solution with QPID_BUILD_ROOT and with
BOOST_ROOT
   set appropriately.

8. In the solution, select Configuration Debug, Platform x86. Build the
solution.

After building the .NET Binding solution you will have the binding proper and a
dozen or so
examples like client-server, drain-spout, sender-receiver, and helloworld ready
to run.

This setup allows you to develop 32-bit and 64-bit .NET Binding code without
having to adjust
your environment to find the right version of Boost. The procedure assigns the
*_ROOT values
and then launchs Visual Studio so you always have the correct QPID_BUILD_ROOT
and the
correct Boost in your path.

Thanks Steve and Cliff for clarifying the WCF and DOTNET status.

-Chuck

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: QPid .net C# client problem

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
What a waste :/  can u tell what I need to download to use

    - The .NET Binding for the C++ Messaging Client

because I dont understant it clearly what I have to do to use it i C#



Regards,
Adam


W dniu 2010-12-06 23:10, Cliff Jansen pisze:
> Hi Adam,
>
> I regret to report that the C# client you are using is not currently
> being maintained within Qpid and has been identified as a candidate
> for removal.
>
> To paraphrase some recent emails, your best options for Qpid C#
> development are as follows:
>
>     - The Qpid WCF client
> (http://qpid.apache.org/books/trunk/Programming-In-Apache-Qpid/html/ch04.html)
>
>     - The .NET Binding for the C++ Messaging Client
> (http://qpid.apache.org/books/trunk/Programming-In-Apache-Qpid/html/ch05.html)
>
>
> Use the former if you have a preference for using the WCF framework or
> require distributed transactions managed by MSDTC.
>
> The latter currently enjoys the most active support within Qpid and
> gains synergy from the Qpid messaging API work in some of the other
> clients.
>
> Cliff
>
> On Mon, Dec 6, 2010 at 2:47 AM, Adam Kaminiecki<ad...@dgt.com.pl>  wrote:
>> Hi
>>
>> MyClient=new MessageListener(session);
>> MyClient.NewMessagee += new
>> MessageListener.NewMessage(MyClient_NewMessagee);
>> session.ExchangeDeclare(exchange,type,string.Empty,null,Option.NONE);
>> string myqueue = session.Name;
>> session.QueueDeclare(myqueue);
>>
>>
>> Hi, I get an error in last line i this code:
>> org.apache.qpid.transport.SessionException was unhandled
>>   Message="System.Collections.Generic.List`1[org.apache.qpid.transport.ExecutionException]"
>>   Source="qpid.client"
>>
>>
>>
>> Can you give me some advice?
>>
>>
>> And I have few questions more:
>>
>> When Im creating sessiom why I must declare expiry in seconds?? Its timeout
>> for request-response?
>>
>> Where can I find explanation of patrameters Option??
>>
>>
>>
>>
>> Is it correct declaration for consumer/message listener or am I doing
>> something wrong??
>>
>>   private class MessageListener:IMessageListener
>>         {
>>             private readonly ISession session;
>>
>>              public MessageListener(ISession sess)
>>             {
>>                 session = sess;
>>             }
>>
>>             public delegate void NewMessage(IMessage e);
>>             public event NewMessage NewMessagee;
>>
>>             public void MessageTransfer(IMessage m)
>>             {
>>                 var range = new RangeSet {m.Id};
>>                 session.MessageAccept(range,null);
>>                 NewMessagee(m);
>>             }
>>         }
>>
>>
>> Regards,
>> Adam
>>
>>
>>
>>
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: QPid .net C# client problem

Posted by Cliff Jansen <cl...@gmail.com>.
Hi Adam,

I regret to report that the C# client you are using is not currently
being maintained within Qpid and has been identified as a candidate
for removal.

To paraphrase some recent emails, your best options for Qpid C#
development are as follows:

   - The Qpid WCF client
(http://qpid.apache.org/books/trunk/Programming-In-Apache-Qpid/html/ch04.html)

   - The .NET Binding for the C++ Messaging Client
(http://qpid.apache.org/books/trunk/Programming-In-Apache-Qpid/html/ch05.html)


Use the former if you have a preference for using the WCF framework or
require distributed transactions managed by MSDTC.

The latter currently enjoys the most active support within Qpid and
gains synergy from the Qpid messaging API work in some of the other
clients.

Cliff

On Mon, Dec 6, 2010 at 2:47 AM, Adam Kaminiecki <ad...@dgt.com.pl> wrote:
> Hi
>
> MyClient=new MessageListener(session);
> MyClient.NewMessagee += new
> MessageListener.NewMessage(MyClient_NewMessagee);
> session.ExchangeDeclare(exchange,type,string.Empty,null,Option.NONE);
> string myqueue = session.Name;
> session.QueueDeclare(myqueue);
>
>
> Hi, I get an error in last line i this code:
> org.apache.qpid.transport.SessionException was unhandled
>  Message="System.Collections.Generic.List`1[org.apache.qpid.transport.ExecutionException]"
>  Source="qpid.client"
>
>
>
> Can you give me some advice?
>
>
> And I have few questions more:
>
> When Im creating sessiom why I must declare expiry in seconds?? Its timeout
> for request-response?
>
> Where can I find explanation of patrameters Option??
>
>
>
>
> Is it correct declaration for consumer/message listener or am I doing
> something wrong??
>
>  private class MessageListener:IMessageListener
>        {
>            private readonly ISession session;
>
>             public MessageListener(ISession sess)
>            {
>                session = sess;
>            }
>
>            public delegate void NewMessage(IMessage e);
>            public event NewMessage NewMessagee;
>
>            public void MessageTransfer(IMessage m)
>            {
>                var range = new RangeSet {m.Id};
>                session.MessageAccept(range,null);
>                NewMessagee(m);
>            }
>        }
>
>
> Regards,
> Adam
>
>
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org