qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kaminiecki <ada...@dgt.com.pl>
Subject Re: Client trouble
Date Thu, 09 Dec 2010 12:35:34 GMT
Nice, thanks for quick reply.

You are right:) I missed it that becasue when I was using

  session.MessageTransfer(exchange,routingKey,mes);

everything is ok.  but If I want to set persistence.... How to set 
Header for propely sending message to direct and topic exhcange??


Regards,
Adam


W dniu 2010-12-09 13:21, Gordon Sim pisze:
> On 12/09/2010 11:33 AM, Adam Kaminiecki wrote:
>> Hi
>>
>> I'm using C# client 0.6 and have some problems.
>>
>>
>> I can send and recive message from and send to
>> non durable,fanaut exchange
>>
>> but whenm I'm trying to do it whit topic or direct exchange no message
>> income ;/
>>
>> what am I doing wrong?
>>
>> code:
>>
>>
>> declaring exchange
>>
>> session.ExchangeDeclare(exchName, exchType, string.Empty, null,
>> Option.NONE);
>>
>> and declare consumer
>>
>> myClient = new MessageListener(session);
>> myClient.NewMessagee += MyClient_NewMessagee;
>> myqueue = session.Name;
>> session.QueueDeclare(myqueue,string.Empty,null,op);
>> session.ExchangeBind(myqueue, exchName, routingKey);
>> session.AttachMessageListener(myClient, myqueue);
>> session.MessageSubscribe(myqueue);
>>
>>
>> and sendding message
>> session.MessageTransfer(exchange, MessageAcceptMode.EXPLICIT,
>> MessageAcquireMode.PRE_ACQUIRED,new Header(), obj[1] as
>> byte[],Option.NONE);
>
> Your published message needs to include a routing key (unless the 
> exchange is a fanout exchange). I'm not familiar enough with that 
> particular client to tell you how to do that exactly. Look for 
> MessageProperties in the Header perhaps?
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message