Date: Tue, 19 Mar 2024 10:13:07 +0000 (UTC) Message-ID: <2015081181.56240.1710843187878@cwiki-he-fi.apache.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_56239_985877072.1710843187877" ------=_Part_56239_985877072.1710843187877 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
gtask
ComponentAvailable as of Camel 2.1
The gtask
component contributes to the Camel Components for Google App Engine (GAE). It su=
pports asynchronous message processing on GAE by using the task queueing service as message queue. For adding mess=
ages to a queue it uses the task queue API. For receiving messages from a q=
ueue 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 U=
RIs that make message queueing on GAE as easy as message queueing with JMS or SEDA.
gtask://queue= -name[?options]
Name |
Default Value |
Context |
Description |
---|---|---|---|
|
|
Producer |
The servlet mapping for callback handlers. By=
default, this component requires a callback servlet mapping of |
|
reference to | Consumer |
Reference to an |
|
reference to | Producer |
Reference to an |
On the consumer-side, all options of the Servlet component are supported.
On the consumer-side all headers of the Servlet component component are supported plus the follow= ing.
Name |
Type |
Context |
Description |
---|---|---|---|
|
|
Consumer |
Name of the task queue. |
|
|
Consumer |
Name of the task (generated value). |
|
|
Consumer |
Number of callback retries. |
On the producer side the in
message body is converted to a =
byte[]
and is POSTed to the callback handler as content-type <=
code>application/octet-stream.
Setting up tasks queues is an administrative task on Google App Engine. =
Only one queue is pre-configured and can be referenced by name out-of-the-b=
ox: the default
queue. This queue will be used in the followin=
g examples. Please note that when using task queues on the local developmen=
t server, tasks must be executed manually from the developer conso=
le.
... .to(gtask:default) // add message to default queue from(gtask:default) // receive message from default queue (via a web hook) ...
This example requires the following servlet mapping.
... <servlet> <servlet-name>CamelServlet</servlet-name> <servlet-class>org.apache.camel.component.servlet.CamelHttpTr= ansportServlet</servlet-class> ... </servlet> ... <servlet-mapping> <servlet-name>CamelServlet</servlet-name> <url-pattern>/worker/*</url-pattern> </servlet-mapping> ...
Maven users will need to add the following dependency to their pom=
.xml
.
<dependenc= y> <groupId>org.apache.camel</groupId> <artifactId>camel-gae</artifactId> <version>x.x.x</version> </dependency>