Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 25246 invoked from network); 9 Oct 2007 13:39:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 13:39:00 -0000 Received: (qmail 15923 invoked by uid 500); 9 Oct 2007 13:38:40 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 15897 invoked by uid 500); 9 Oct 2007 13:38:40 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 15871 invoked by uid 99); 9 Oct 2007 13:38:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 06:38:40 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 13:38:44 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E2CF57141FE for ; Tue, 9 Oct 2007 06:38:23 -0700 (PDT) Message-ID: <731039.1191937103925.JavaMail.jira@brutus> Date: Tue, 9 Oct 2007 06:38:23 -0700 (PDT) From: "Dejan Bosanac (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-1453) Synchronous response from REST API MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Synchronous response from REST API ---------------------------------- Key: AMQ-1453 URL: https://issues.apache.org/activemq/browse/AMQ-1453 Project: ActiveMQ Issue Type: New Feature Reporter: Dejan Bosanac Fix For: 5.0.0 Attachments: activemq-web-lingo.patch In some situations it could be very useful to use REST API in the "synchronous mode". I've implemented this in the following manner: If the "sync" header is set to the POST request the module will use Lingo project to perform request/response action with a given timeout. The timeout value could be set through the "replyTimeout" servlet config parameter. A default value is 1000 (1s). In case that response comes back in a specified time, the message will be returned as a response body. Timout exception will be ignored (maybe this could be configurable too?) so it will return OK status with empty response body (just as it is now) in case of timeout. In case that "sync" header is not set the API behaves the same as now. I've considered a few options for this implementation, but Lingo in the end seemed the best solution. It is not too heavy and it could be potentially used for other stuff in the future. One thing I would like to see improved in Lingo in the future is support for sending a message with persistency, priority and time to live parameters (new "request" method signature). Also, it depends on old version of amq which must be excluded in dependency declarations since it breaks the build. I could implement these improvments if you are interested. I think this is quite a useful feature. I'm using it in a current project, but I would like if it could be included in a activemq-web module in the future. So, if anyone have any ides how some of these stuff could be implemented better or have some fresh ideas, please let me know. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.