[ 
https://issues.apache.org/jira/browse/CAMEL-12913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

D001 updated CAMEL-12913:
-------------------------
    Description: 
I am using camel disruptor component to perform asynchronous processing. My 
application receives request from an application through HTTP rest service and 
process that, keep that request in exchange property, prepare a response and 
send it to another HTTP service.

*RouteBuilder:*
{code:java}
from("direct: receiveMessageHttp")
 .routeId("receiveMessageHttpRoute")
 .threads()
 .process(new ValidateReceivedHttpRequestProcessor())
 .process(new SetHttpResponseToExchangePropertyProcessor())
 .inOnly("disruptor://prepareResponse")
 end();
 
from("disruptor:prepareResponseRoute?concurrentConsumers=5") 
 .routeId("prepareResponseRoute")
 .process(new DoSomethingProcessor())
 .toD("http://sendToMyHttpPostServiceUrl.com/sendHere";)
 .end();{code}
The problem that I am facing here is, the message is received at 
[http://sendToMyHttpPostServiceUrl.com/sendHere|http://sendtomyhttppostserviceurl.com/sendHere]
 but the ring buffer of prepareResponseRoute disruptor still holds the exchange 
(exchange property, in message body etc.) and never releasing. Note that I have 
kept default ring buffer size (1024).

I am facing memory issue because of this.

 

  was:
I am using camel disruptor component to perform asynchronous processing. My 
application receives request from an application through HTTP rest service and 
process that, keep that request in exchange property, prepare a response and 
send it to another HTTP service.

*RouteBuilder:*
{code:java}
from("direct: receiveMessageHttp")
 .routeId("receiveMessageHttpRoute")
 .process(new ValidateReceivedHttpRequestProcessor())
 .process(new SetHttpResponseToExchangePropertyProcessor())
 .inOnly("disruptor://prepareResponse")
 end();
 
from("direct:prepareResponseRoute") 
 .routeId("prepareResponseRoute")
 .process(new DoSomethingProcessor())
 .toD("http://sendToMyHttpPostServiceUrl.com/sendHere";)
 .end();{code}
The problem that I am facing here is, the message is received at 
[http://sendToMyHttpPostServiceUrl.com/sendHere|http://sendtomyhttppostserviceurl.com/sendHere]
 but the ring buffer of receiveMessageHttpRoute and prepareResponseRoute 
disruptors still hold the exchange (exchange property, in message body etc.) 
and never releasing. Note that I have kept default ring buffer size (1024).

I am facing memory issue because of this.

 


> Does camel disruptor hold processed messages?
> ---------------------------------------------
>
>                 Key: CAMEL-12913
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12913
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-disruptor, camel-http, camel-http4
>    Affects Versions: 2.18.5, 2.20.0
>            Reporter: D001
>            Priority: Critical
>
> I am using camel disruptor component to perform asynchronous processing. My 
> application receives request from an application through HTTP rest service 
> and process that, keep that request in exchange property, prepare a response 
> and send it to another HTTP service.
> *RouteBuilder:*
> {code:java}
> from("direct: receiveMessageHttp")
>  .routeId("receiveMessageHttpRoute")
>  .threads()
>  .process(new ValidateReceivedHttpRequestProcessor())
>  .process(new SetHttpResponseToExchangePropertyProcessor())
>  .inOnly("disruptor://prepareResponse")
>  end();
>  
> from("disruptor:prepareResponseRoute?concurrentConsumers=5") 
>  .routeId("prepareResponseRoute")
>  .process(new DoSomethingProcessor())
>  .toD("http://sendToMyHttpPostServiceUrl.com/sendHere";)
>  .end();{code}
> The problem that I am facing here is, the message is received at 
> [http://sendToMyHttpPostServiceUrl.com/sendHere|http://sendtomyhttppostserviceurl.com/sendHere]
>  but the ring buffer of prepareResponseRoute disruptor still holds the 
> exchange (exchange property, in message body etc.) and never releasing. Note 
> that I have kept default ring buffer size (1024).
> I am facing memory issue because of this.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to