ft420 wrote:
Hi
following command was executed :
]#./qpid-config  add queue message_queue --durable --file-size=28 
--file-count=10 --policy-type=flow_to_disk --bind amq.direct message_queue 
routing_key
]# ./qpid-config  queues
Queue Name             Attributes
=============================================
message_queue          --durable --file-size=28 --file-count=10 
--policy-type=flow_to_disk

]# ./direct_producer Total time required to send is Minutes:: 0 sec:: 0 Millisec:: 2 No of 10 messages ]# ./my_listener Queue Size0
 Total time required to receive is Minutes:: 0 :sec:: 0 Millisec:: 0 No of 0 
messages synchronously

]# ./qpidd --auth no --default-queue-limit 0 --load-module msgstore.so 2009-apr-16 16:15:54 notice Journal "TplStore": Created
2009-apr-16 16:15:54 notice Store module initialized; dir=/root/.qpidd
2009-apr-16 16:15:54 notice Listening on TCP port 5672
2009-apr-16 16:15:54 notice Broker running
2009-apr-16 16:19:09 warning SASL: No Authentication Performed
2009-apr-16 16:19:10 notice Journal "message_queue": Created
2009-apr-16 16:19:12 warning SASL: No Authentication Performed
2009-apr-16 16:29:40 warning SASL: No Authentication Performed

where are the messages going when ./qpid-config queues lists the queue added routing key used in direct_producer is also routing_key and destination is amq.direct listener is reading from message_queue only..
how to make this work?

To use the direct example you also need to bind the message queue to amq.direct. You can either use the declare_queues program that comes with that example or you can use qpid-config bind amq.direct message_queue routing_key.

[Fyi: You can avoid the need for the separate binding by altering the producer to send the message to the default (i.e. nameless) exchange with the queue name as the routing key.

E.g. line 82 becomes:

  message.getDeliveryProperties().setRoutingKey("message_queue");

and lines 91 and 97 become simply:

  session.messageTransfer(arg::content=message);]

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to