[openamq-dev] Open AMQ --> Exchange Declaration, Queue Bind
mousami lokapur
mousami31 at hotmail.com
Mon Aug 20 09:31:32 CEST 2007
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
More information about the openamq-dev
mailing list