[openamq-dev] Help on Openamq required
Martin Sustrik
sustrik at imatix.com
Thu Aug 16 10:59:57 CEST 2007
Hi Mousami,
You cannot expect that amq_client_session_basic_arrived will return
content every time. If there are no messages received, it will simply
return NULL. If you want to wait while a message is delivered, use
amq_client_session_wait. However, if you use amq_client_session_wait
with a finite timeout (like you do), amq_client_session_basic_arrived
may still return NULL after the waiting ended (in case the timeout was
reached).
Following pseudo-code shows how standard message-receiving loop looks like:
while (1) {
content = amq_client_session_basic_arrived (session);
if (content) {
... process the content ...
}
else
amq_client_session_wait (session, -1);
}
Martin
Mousami Kelkar wrote:
> Hi,
>
> Openamq on Linux
>
> Step 1)
>
> I have set the environment variables IBASE, PATH and BOOM_MODEL (st,
> debug) as mentioned in the help.
>
> Step 2)(on Window 1)
>
>>amq_server.exe
>
> Step3) (on Window 2)
>
>>./sendtest
>
> Step4) (on Window 3)
>
> ./mqreceive
>
>
>
> sendtest and mqreceive are compiled using c.bat
>
> In mqreceive.c following statement throws error:
>
> assert(content); //fails
>
> I am attaching sendtest.c and mqreceive.c for your reference that are
> being used to send and receive the message.
>
>
> <<sendtest.c>> <<mqreceive.c>>
>
> Can you please give me im_send.pal since the one which is provided in
> the package(im_send.pal) is not generating .c code.
>
> Following error is generated :
>
> [root at FTCPU0676 samplecode]# pal im_send.pal
>
> 2007/06/24 23:21:36: gsl/4 M: <read> not allowed in repeat '1' in
> session '1' in pal ''
>
> Compiling im_send...
>
> gcc: im_send.c: No such file or directory
>
> gcc: no input files
>
> E: compilation failed
>
>
> Thanks & best regards,
>
> *Mousami Kelkar*
>
> Board No: 022-67099000 Extn: 9150
>
> Fax: 022-67099100
>
> ___mousami.kelkar at ftindia.com_ <mailto:mousami.kelkar at ftindia.com>
>
> ___www.ftindia.com_ <http://www.ftindia.com/>
>
> Disclaimer:
>
> The information in this E-mail (which includes any files transmitted
> with it) is CONFIDENTIAL and may be legally PRIVILEGED. It is intended
> solely for the addressee and access to this email by anyone else is
> unauthorized. If you have received it in error, please destroy any
> copies of this message, including any attachments, and delete it from
> your system notifying the sender immediately. Any disclosure, copying,
> distribution, dissemination, forwarding, printing or any action taken or
> omitted to be taken in reliance on it or utilising the same for any
> purpose other than what it is intended for, is prohibited and may be
> unlawful.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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