I have one more question how can I get message synchronius? I know how to subscribe for asynchronius.

Is method

session.Sync();

set all operation synchronius?



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-subscr...@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-subscr...@qpid.apache.org

Reply via email to