You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Stephane Bailliez <sb...@gmail.com> on 2017/01/18 04:24:18 UTC

direct-vm broken in 2.18.1 compared to 2.17.x ?

Wondering  if this is as expected and a behavior change or if this is a bug.

I have some "simple" routes that communicate between contexts using
direct-vm and expecting some response back. Not sure if behavior has
changed on purpose in 2.18, but looks like I'm receiving now a body null
instead of the expected body.

I can reproduce this easily with a unit test where:

// context 1

from("direct:step-1a")
 .log("Received ${body}")
 .to("direct-vm:step-2a")
 .log("Received ${body}").routeId("end-step-1a");


// context 2

from("direct-vm:step-2a")
 .log("Received ${body}")
 .setBody(constant("Bye"));


If I do:

template.sendBody("direct:step-1a", "Hello World");

in 2.17.x I receive "Bye", in 2.18.1 I receive null

That totally took me by surprise when upgrading as my unit tests where all
mocking direct-vm and I didn't catch this.

Happy to open a jira with a unit test for this.


-- stephane