camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From will mad <ze.itc...@gmail.com>
Subject How to process continuous data stream
Date Wed, 06 May 2009 15:50:24 GMT
Hi,

I would like to write a route inside camel in order to handle the following
scenario:

Send an http request to a distant system like this one : “GET
/execute.cgi?opname=get_notifications HTTP/1.1”

When receiving this HTTP request, the distant server responds, in a
continuous-session HTTP reply. It means that the HTTP session remains alive
and is never closed. The distant system continuously sends messages. So my
camel component has to send the request and then continuously receives data
from the distant server. My problem is when I send the request, I only
receive the first line of the message from the distant system, and leave my
route without processing other messages.

Here is my route:

from("file://c:/tmp/test?delete=true")

.to("log:request")

      .setBody(constant("GET /execute.cgi?opname=get_notifications
HTTP/1.1\r\n\r\n"))

      .to("mina:tcp://localhost:4122?textline=true&sync=false")

      .to("log:response");



While the distant system continuously sends messages like these:

notification start:

notification: intrusion_detection

channel: 1

time: 01:01:1900,00:00:00

center_x: 0.260118

center_y: 0.522264

dimension_x: 0.084398

dimension_y: 0.088446

object_id: 270771

region_id: 1

notification end:

notification start:

notification: all_detections_cleared

channel: 1

notification end:



I only receive the first message:

notification start:



Is there a way to continuously process received messages?



Thanks for you help,

William

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message