Dear list members
I have defined the following route in my application:
<camel:camelContext>
<camel:route>
<camel:from uri="direct:gozing/engine/user" />
<camel:marshal>
<camel:json library="Jackson"/>
</camel:marshal>
<camel:recipientList>
<camel:simple id="java.lang.String">
stomp:topic:dm${body.userId}
</camel:simple>
</camel:recipientList>
</camel:route>
</camel:camelContext>
Here is how I am sending the message:
interface _Producer {
void onUserEarningEvent(@Body UserEarningEvent e);
}
@Component
public class UserEventProducer {
@Produce(uri = "direct:gozing/engine/user")
private _Producer
producer;
public void onUserEarningEvent(final UserEarningEvent e) {
producer.onUserEarningEvent(e);
}
}
However, it appears that what's get sent over is a bit more than I expected:
Method with name: userId not found on bean: [B@6cf54776 of type: [B.
Exchange[Message:
{"args":[*{"id":0,"userId":2,"created":null,"updated":null,"amount":5,"reason":"SingleClickOffer","description":"Reward
for Oakley GP-75 Dispatch II Sunglasses $55"}*
],"method":{"name":"onUserEarningEvent","returnType":"void","parameterTypes":["com.usamp.gozing.engine.messaging.event.user.earning.UserEarningEvent"],"exceptionTypes":[],"modifiers":1025,"annotations":[],"parameterAnnotations":[[{}]],"synthetic":false,"typeParameters":[],"declaringClass":"com.usamp.gozing.engine.messaging.producer.user._Producer","declaredAnnotations":[],"genericReturnType":"void","genericParameterTypes":["com.usamp.gozing.engine.messaging.event.user.earning.UserEarningEvent"],"genericExceptionTypes":[],"bridge":false,"varArgs":false,"defaultValue":null,"accessible":false}}]
at
org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:117)
~[camel-core-2.12-SNAPSHOT.jar:2.12-SNAPSHOT]
I really just expected to see this part in my actual message:
*{"id":0,"userId":2,"created":null,"updated":null,"amount":5,"reason":"SingleClickOffer","description":"Reward
for Oakley GP-75 Dispatch II Sunglasses $55"}*
*
*
Any ideas on what I can do to fix this. I am sure it's something that I am
not understanding about how Camel works.
Thanks.
-AP_