On 8/22/06, blueshed <[EMAIL PROTECTED]> wrote:
Because you're function waitForReceipt() cannot work if a message comes before a receipt if the subscription is activemq.prefetchSize=1 as the server will wait for an ack to the message before sending RECEIPT(SUBSCRIBE) and RECEIPT(ACK)! The server is waiting. RECEIPTs and ERRORs should be sent before MESSAGEs when the prefetch is 1 or not be part of the prefetch mechanism. Sorry to be confusing - it has been a long march for me to get to this point. Without this concept I cannot have a blocking send within a transaction where I handle both SEND and RECEIVE on the same thread. MESSAGE, ACK AND RECEIPT are all part of one message delivery as is SUBSCRIBE, RECEIPT before MESSAGE.
Am still a little confused here. To create a single threaded blocking SEND, can't you send the message then keep reading inbound commands until you find a RECEIPT for it - putting any other inbound commands in a list to be processed after the SEND is complete? BTW are you trying to do request/response stuff here? If so I'd recommend you create a subscription up front first before doing any sending.... http://incubator.apache.org/activemq/how-should-i-implement-request-response-with-jms.html -- James ------- http://radio.weblogs.com/0112098/
