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/16 10:55:49 UTC

C# client question

Hi,

Is any method in C# client to ask server for message from queue 
something like SingleGet?

For example

im using method "singleGet" with parameters (queueName) and server 
return one message or null if queue is empty

Is something like that in C# client??



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: C# client question

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
Hi,


Can anybody tell my after 60sec always get an error

"Connection lost"


I'm using qpid C++ broker 0.8 and .net client qpid-dotnet-0-10-0.8. 
<http://www.apache.net.pl//qpid/0.8/qpid-dotnet-0-10-0.8.zip>


I'm creating session like above:
session = connections.CreateSession(0);



Regards,
Adam

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


Re: C# client question

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
Guys again two more question :)

how to run client in failover mode?


connections.CreateSession(10);   time declared in Createsession is for 
what? If it's inactive then close? or always when time count down to 0 I 
need to reconnect??

Any example will be very helpfull.



Regards,
Adam



W dniu 2010-12-16 12:41, Adam Kaminiecki pisze:
> Thanks a lot I'm going to try it!! :)
>
> One more question
> connections.CreateSession(10);
>
> time declared in Createsession is for what? If it's inactive then 
> close? or always when time count down to 0 I need to reconnect??
>
> W dniu 2010-12-16 12:36, Chuck Rolke pisze:
>> Hi Adam,
>>
>> In the .NET Binding there is nothing like that directly. However, its 
>> pretty
>> easy to do. Create a connection to the broker. Then create a receiver 
>> that
>> gets to the queue you want by specifying the queue's address. Finally 
>> Fetch() a
>> message from that queue. From the examples the code looks like:
>>
>>      Receiver receiver = session.CreateReceiver(address);
>>      Message message = new Message();
>>      message = receiver.Fetch(DurationConstants.SECOND * 1);
>>
>> You could create a Duration with a value of zero to make Fetch return
>> right away if no message is present.
>>
>> -Chuck
>>
>> ----- "Adam Kaminiecki"<ad...@dgt.com.pl>  wrote:
>>
>>> From: "Adam Kaminiecki"<ad...@dgt.com.pl>
>>> To: users@qpid.apache.org
>>> Sent: Thursday, December 16, 2010 4:55:49 AM GMT -05:00 US/Canada 
>>> Eastern
>>> Subject: C# client question
>>>
>>> Hi,
>>>
>>> Is any method in C# client to ask server for message from queue
>>> something like SingleGet?
>>>
>>> For example
>>>
>>> im using method "singleGet" with parameters (queueName) and server
>>> return one message or null if queue is empty
>>>
>>> Is something like that in C# client??
>>>
>>>
>>>
>>> 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: C# client question

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
Thanks a lot I'm going to try it!! :)

One more question
connections.CreateSession(10);

time declared in Createsession is for what? If it's inactive then close? 
or always when time count down to 0 I need to reconnect??

W dniu 2010-12-16 12:36, Chuck Rolke pisze:
> Hi Adam,
>
> In the .NET Binding there is nothing like that directly. However, its pretty
> easy to do. Create a connection to the broker. Then create a receiver that
> gets to the queue you want by specifying the queue's address. Finally Fetch() a
> message from that queue. From the examples the code looks like:
>
>      Receiver receiver = session.CreateReceiver(address);
>      Message message = new Message();
>      message = receiver.Fetch(DurationConstants.SECOND * 1);
>
> You could create a Duration with a value of zero to make Fetch return
> right away if no message is present.
>
> -Chuck
>
> ----- "Adam Kaminiecki"<ad...@dgt.com.pl>  wrote:
>
>> From: "Adam Kaminiecki"<ad...@dgt.com.pl>
>> To: users@qpid.apache.org
>> Sent: Thursday, December 16, 2010 4:55:49 AM GMT -05:00 US/Canada Eastern
>> Subject: C# client question
>>
>> Hi,
>>
>> Is any method in C# client to ask server for message from queue
>> something like SingleGet?
>>
>> For example
>>
>> im using method "singleGet" with parameters (queueName) and server
>> return one message or null if queue is empty
>>
>> Is something like that in C# client??
>>
>>
>>
>> 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: C# client question

Posted by Chuck Rolke <cr...@redhat.com>.
Hi Adam,

In the .NET Binding there is nothing like that directly. However, its pretty
easy to do. Create a connection to the broker. Then create a receiver that
gets to the queue you want by specifying the queue's address. Finally Fetch() a
message from that queue. From the examples the code looks like:

    Receiver receiver = session.CreateReceiver(address); 
    Message message = new Message();
    message = receiver.Fetch(DurationConstants.SECOND * 1);

You could create a Duration with a value of zero to make Fetch return
right away if no message is present.

-Chuck

----- "Adam Kaminiecki" <ad...@dgt.com.pl> wrote:

> From: "Adam Kaminiecki" <ad...@dgt.com.pl>
> To: users@qpid.apache.org
> Sent: Thursday, December 16, 2010 4:55:49 AM GMT -05:00 US/Canada Eastern
> Subject: C# client question
>
> Hi,
> 
> Is any method in C# client to ask server for message from queue 
> something like SingleGet?
> 
> For example
> 
> im using method "singleGet" with parameters (queueName) and server 
> return one message or null if queue is empty
> 
> Is something like that in C# client??
> 
> 
> 
> 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


RE: C# client question

Posted by Steve Huston <sh...@riverace.com>.
Did you try the Receiver's get method?

-Steve

--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com


> -----Original Message-----
> From: Adam Kaminiecki [mailto:adamka@dgt.com.pl] 
> Sent: Thursday, December 16, 2010 4:56 AM
> To: users@qpid.apache.org
> Subject: C# client question
> 
> 
> Hi,
> 
> Is any method in C# client to ask server for message from queue 
> something like SingleGet?
> 
> For example
> 
> im using method "singleGet" with parameters (queueName) and server 
> return one message or null if queue is empty
> 
> Is something like that in C# client??
> 
> 
> 
> 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