[openamq-dev] Open AMQ --> Exchange Declaration, Queue Bind

Martin Sustrik sustrik at imatix.com
Tue Aug 21 15:47:54 CEST 2007


Mousami,

It's quite difficult and time consuming to examine parts of program. May 
you please send the code that doesn't work? The more simple the code, 
the easier it would be for us to find out what the problem is.

Martin

mousami lokapur wrote:
> 
> Hi,
> 
> As suggested by you i have declared exchange on publisher(sendtest.c) side 
> and done queue declaration, queue bind and consume on consumer(mqreceive.c) 
> side.
> exchange declaration is as follows:
> amq_client_session_exchange_declare(
> session,
> 0,
> "amq.direct",
> "direct",
> 0,
> 1,
> 0,
> 0,
> NULL); // here the exchange variable of the session is not getting 
> initialized with the exchange name.
> :
> :
> publishing the message as follows:
> amq_client_session_basic_publish(
> session,
> content,
> 0,
> "amq.direct",
> "amq.testq",
> 0,
> 0);
> 
> On consumer end :
> 
> amq_client_session_queue_declare(
> session,
> 0,
> "amq.testq",
> 0,
> 1,
> 0,
> 0,
> NULL);
> 
> amq_client_session_bind(
> session,
> 0,
> "amq.testq",
> "amq.direct",
> "amq.testq",
> NULL);
> 
> amq_client_session_basic_consume(
> session,
> 0,
> "amq.testq",
> NULL,
> 0,
> 0,
> 0,
> NULL);
> 
> 
> i am trying to receive 1 message using this sample test code.
> hence i incorporated your suggestion of using following steps in receive 
> application:
> 
>      amq_client_session_wait (session, -1);
>      content = amq_client_session_arrived (session);
> 
> Please let me know if any of declaration/binding is incorrect as i am still 
> unable to receive message.
> I am opening an connection using 127.0.0.1:5672 on both publisher and 
> consumer side.
> 
> Can you please let me know under normal circumstances how much time is 
> required to receive the message on receiver end.
> Thanks
> Mousami
> 
> _________________________________________________________________
> Live the life in style with MSN Lifestyle. Check out!  
> http://content.msn.co.in/Lifestyle/Default
> 
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev



More information about the openamq-dev mailing list