camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From magner58 <johnhenrysm...@gmail.com>
Subject PollingConsumerPollStrategy for AMQPComponent endpoint
Date Wed, 25 Sep 2013 13:02:23 GMT
I try to use my custom PollingConsumerPollStrategy for AMQPComponent
endpoint, but my enpoint can't be created.

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
amqp:queue:broadcast.MY_QUEUE?pollStrategy=%23MyPollingConsumerPollStrategy
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown
parameters=[{pollStrategy=#MyPollingConsumerPollStrategy}]
	at
org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:148)
	at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:105)

In my RouteBuilder I do the following:

JndiRegistry registry = (JndiRegistry)
((PropertyPlaceholderDelegateRegistry)
getContext().getRegistry()).getRegistry();

registry.bind(LoaderPollingConsumerPollStrategy.class.getSimpleName(), new
MyPollingConsumerPollStrategy());

(AMQPComponent) AMQPComponent.amqpComponent("My AMQP broker URI");

Endpoint amqpEndpoint =
this.amqpComponent.createEndpoint("amqp:queue:broadcast.MY_QUEUE?pollStrategy=#MyPollingConsumerPollStrategy");
// ResolveEndpointFailedException here



--
View this message in context: http://camel.465427.n5.nabble.com/PollingConsumerPollStrategy-for-AMQPComponent-endpoint-tp5740198.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message