activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac (JIRA)" <>
Subject [jira] Resolved: (AMQ-1453) Synchronous response from REST API
Date Thu, 09 Oct 2008 13:21:52 GMT


Dejan Bosanac resolved AMQ-1453.

      Assignee: Dejan Bosanac
    Resolution: Fixed

I've implemented this using Camel instead of Lingo ... If you pass the sync parameter with
the post, the servlet will wait for a response. Timeout is supported, but will be available
when we upgrade to Camel 1.5 due to

> Synchronous response from REST API
> ----------------------------------
>                 Key: AMQ-1453
>                 URL:
>             Project: ActiveMQ
>          Issue Type: New Feature
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>             Fix For: 5.3.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.

View raw message