StackOver Link for the same question
http://stackoverflow.com/questions/34949651/apache-camel-seda-endpoint-blockwhenfull-not-acknowledged

On Fri, Jan 22, 2016 at 2:25 PM, Bhuvan Gupta <[email protected]> wrote:

> Hello,
>
> "BlockWhenFull" not acknowledged  i.e if size is set to 2 and i send 3 msg
> in a loop with body as "1" , "2" and "3" than i get sleep msg for only "1"
> and "2" and i guess third msg is silently dropped even when i have set the
> "BlockWhenFull" as true.
>
> *What am i doing wrong?*
>
> version: 2.15.3
>
> from("seda:myqueue?size=2&blockWhenFull=true").process(sleep());
>
>
> private Processor sleep() {
>                 return new Processor() {
>                     @Override
>                     public void process(Exchange exchange) throws Exception {
>                         String body = exchange.getIn().getBody(String.class);
>                         System.out.println(curTime() + " Going for sleep 
> sleepid=" + body );
>                         Thread.sleep(5000l);
>                         System.out.println(curTime() + " Done sleep sleepid=" 
> + body );
>                     }
>                 };
>
> for (Integer i = 0; i <5; i++) {
>             Exchange exchange = new DefaultExchange(context);
>             exchange.setPattern(ExchangePattern.InOnly);
>             exchange.getIn().setHeader("header", i);
>             exchange.getIn().setBody(i.toString());
>            System.out.println("sending msg to seda");
>            Exchange send = template.send("seda:myqueue",exchange);
>            System.out.println("done:"+i);
>
>         }
>
>

Reply via email to