Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Java: Receive answer from Windows Azure Service Bus Queue

$
0
0

Hi,

I'm trying to implement Request Response Queue using Windows Azure Service Bus Queue. I created two queues: Request and Response.

My client side send message to Request queue, then my server side take this message from Request queue, do something and put response into Response Queue. The client side check Response queue if there are any messages. When I run only one client it's working fine.

When I run more then one client, after some time clients side don't pull off any message from Response queue. This queue for sure isn't empty, because client side check how many messages are there.

For receiving message I use:

ReceiveMessageOptions options = ReceiveMessageOptions.DEFAULT;

options.setReceiveMode(ReceiveMode.PEEK_LOCK);

options.setTimeout(20);

ReceiveQueueMessageResult resultQueueMessage = service.receiveQueueMessage(responseQueueName);

BrokeredMessage receivedMessage = resultQueueMessage.getValue();

Any help would be appreciated,

Asia



Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>