qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Client trouble
Date Thu, 09 Dec 2010 12:21:55 GMT
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


Mime
View raw message