Cometd Component
The cometd: component is a transport for working with the jetty implementation of the cometd/bayeux protocol.
Using this component in combination with the dojo toolkit library it's possible to push Camel messages directly into the browser using an AJAX based mechanism.
URI format
cometd://host:port/channelname
The channelname represents a topic that can be subscribed by the Camel endpoints.
Examples
cometd://localhost:8080/service/mychannel cometds://localhost:8443/service/mychannel
where cometds represents an SSL configured endpoint.
See this blog entry by David Greco whom contributed this component to Apache Camel, for a full sample.
Options
Name |
Default Value |
Description |
---|---|---|
resourceBase |
|
It's the root directory for the web resources |
timeout |
240000 |
The server side poll timeout in milliseconds. This is how long the server will hold a reconnect request before responding. |
interval |
0 |
The client side poll timeout in milliseconds. How long a client will wait between reconnects |
maxInterval |
30000 |
The max client side poll timeout in milliseconds. A client will be removed if a connection is not received in this time. |
multiFrameInterval |
1500 |
the client side poll timeout if multiple connections are detected from the same browser |
jsonCommented |
true |
If "true" then the server will accept JSON wrapped in a comment and will generate JSON wrapped in a comment. This is a defence against Ajax Hijacking |
logLevel |
1 |
0=none, 1=info, 2=debug |