Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

gtask Component

Available as of Camel 2.1
The gtask component contributes to the Camel Components for Google App Engine (GAE). It supports asynchronous message processing on GAE by using the task queueing service as message queue. For adding messages to a queue it uses the task queue API. For receiving messages from a queue it installs an HTTP callback handler. The handler is called by an HTTP POST callback (a web hook) initiated by the task queueing service. Whenever a new task is added to a queue a callback will be sent. The gtask component abstracts from these details and supports endpoint URIs that make message queueing on GAE as easy as message queueing with JMS or SEDA.

...

Code Block
gtask://queue-name[?options]

Options

Name

Default Value

Context

Description

workerRoot

worker

Producer

The servlet mapping for callback handlers. By default, this component requires a callback servlet mapping of /worker/*. If another servlet mapping is used e.g. /myworker/* it must be set as option on the producer side: to("gtask:myqueue?workerRoot=myworker").

inboundBindingRef

reference to GTaskBinding

Consumer

Reference to an InboundBinding<GTaskEndpoint, HttpServletRequest, HttpServletResponse> in the Registry for customizing the binding of an Exchange to the Servlet API. The referenced binding is used as post-processor to org.apache.camel.component.http.HttpBinding.

outboundBindingRef

reference to GTaskBinding

Producer

Reference to an OutboundBinding<GTaskEndpoint, TaskOptions, void> in the Registry for customizing the binding of an Exchange to the task queueing service.

queueRef

reference to QueueFactory.getQueue(String queueName)

Producer

Reference to a Queue in the Registry. Only relevant in context of testing.

On the consumer-side, all options of the Servlet component are supported.

...

Code Block
xml
xml
titleweb.xml
    ...
    <servlet>
        <servlet-name>CamelServlet</servlet-name>
        <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
        ...
    </servlet>
    ...
    <servlet-mapping>
        <servlet-name>CamelServlet</servlet-name>
        <url-pattern>/worker/*</url-pattern>
    </servlet-mapping>
    ...

Advanced usage

TODO ...

Dependencies

Maven users will need to add the following dependency to their pom.xml.

Code Block
xml
xml
titlepom.xml
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-gae</artifactId>
    <version>${camel-version}<<version>x.x.x</version>
</dependency>

...

Include Page
CAMEL:Endpoint See AlsoCAMEL:
Endpoint See Also