[openamq-dev] Help on OpenAMQ Queues

Malinga malingajava at yahoo.com
Wed Aug 22 09:04:54 CEST 2007


Hi experts,

    I have a message im sending that message to a queue (cdestination), (via Exchange amq_direct)

mq_client_session_basic_publish (
            session,        // Session
            content,        // Content to send
            0,              // Ticket
            "amq.direct",   // exchange to send message to
            cdestination,   // Routing-key
            FALSE,          // Mandatory
            FALSE);         // Immediate



And i have a queue receiver which is not listening to the queue at time the sender is sending the message to the queue. I test this scenario receiver is not receiving the message if he doesn't listen on that queue while sender is sending the message (i guess this cas it waits in the amq_client_session_wait (session, 0)). So is it possible CAN I RECEIVER MESSAGE AFTER SOMETIME SENDER SENDING  THE MESSAGE.

Receivers code is 

amq_client_session_queue_declare (
                session,                        //  session
                0,                              //  ticket
                NULL,                           //  queue name
                FALSE,                          //  passive
                FALSE,                          //  durable
                TRUE,                           //  exclusive
                TRUE,                           //  auto-delete
                NULL);                          //  arguments

        //  Bind the queue to the exchange
        amq_client_session_queue_bind (
                session,                        //  session
                0,                              //  ticket
                NULL,                           //  queue
                "amq.direct",                   //  exchange
                cdestination,                  //  routing-key
                NULL);                          //  arguments

        //  Consume from the queue
        amq_client_session_basic_consume (
                session,                        //  session
                0,                              //  ticket
                NULL,                           //  queue
                NULL,                           //  consumer-tag
                TRUE,                           //  no-local
                TRUE,                           //  no-ack
                TRUE,                           //  exclusive
                NULL);                          //  arguments

Thanks in advance.
-Malinga





       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openamq.org/pipermail/openamq-dev/attachments/20070822/63d0f279/attachment-0001.htm 


More information about the openamq-dev mailing list