You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by ft420 <ar...@gmail.com> on 2009/04/16 13:06:27 UTC
adding queue with qpid-config and get/put programatically
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?
i.e. declaring queues using qpid-config and put/get msgs via programs..
--
View this message in context: http://n2.nabble.com/adding-queue-with-qpid-config-and-get-put-programatically-tp2642436p2642436.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: adding queue with qpid-config and get/put programatically
Posted by Gordon Sim <gs...@redhat.com>.
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:users-subscribe@qpid.apache.org