-
Bug
-
Resolution: Done
-
Major
-
jboss-fuse-6.1
-
None
-
%
-
-
6.3 Sprint 1 (4-Jan->29-Jan)
It appears that that NotifyBuilder does not work as expected when there is a Master component in the route under test.
A NotifyBuilder including a call to the fromRoute(String) method does not appear to work with a route using the Master component.
- without the master component ("master:one:" in the URI) NotifyBuilder.matches succeeds
- with the master component ("master:one:" in the URI) NotifyBuilder.matches fails
See the attached unit tests
- the tests MUST be run separately
- the testMasterFiltered case shows the failure
I would suggest the following locations of interest within the debugger:
a) the onExchange(Exchange) method defined in the anonymous class in org.apache.camel.builder.NotifyBuilder#fromRoute(java.lang.String)
b) org.apache.camel.util.EndpointHelper#getRouteIdFromEndpoint(org.apache.camel.Endpoint)
Attached is a screenshot of a debugging session inside the EndpointHelper#getRouteIdFromEndpoint(Endpoint) method call:
A) the endpoint passed as the parameter (id@3958)
B) the endpoint in the only route that exists in the camel context (id@3999)
C) the endpoint of the route's consumer (id@3999) - the same as B
D) the endpoint of the master consumer's delegate consumer (id@3958) - the same as A
So D is what we are looking for and will not find; so EndpointHelper#getRouteIdFromEndpoint(Endpoint) will return null.