On 06/15/2011 10:30 AM, Chris wrote:
Hi, sorry but im new to qpid.
I have a server which controls power on my program on my client.
I have to both query the server if powerup is ok, and also listen to the
server if power should be turned off.
I also need to send powerusage from the client to the server every second.
I have to use the messaging api to encode/decode the messages sent/received
correctly.
What i have done so far is sent the message with powerquery and receive from
the appropriate exchange/routing_key which works fine. However if my server
wants to power of my program how do I check this? Do I run a receiver on the
exchange/routing_key at a set interval and check for new messages? I would
rater that if a message appears on the queue, I would receive it
automatically.
Is this doable in the messaging api, if so how?
You can start a thread on your client calling fetch() to wait for messages from
the server.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]