I guess, I am not quite sure how the routes and expressions are working.

The object which I am sending looks like this:

public class UserEarningEvent {
    private int
        id;

    private int
        userId;

... 
    public int getUserId() {
        return userId;
    }
}

On the other side of the route is a STOMP/WebSocket client, so the message
content I ultimately want to send is JSON.

So, I am trying the following route:

    <camel:camelContext>
        <camel:route>
            <camel:from uri="direct:gozing/engine/user" />

            <camel:marshal>
                <camel:json library="Jackson"/>
            </camel:marshal>

            <camel:recipientList>
                <camel:simple resultType="java.lang.String">
                    stomp:topic:dm${body.userId}
                </camel:simple>
            </camel:recipientList>
        </camel:route>
    </camel:camelContext>

But I am realizing that if I convert the object to JSON format, my
<camel:simple> expression may not work as expected.

Here is what I actually want to do:

1) Take the original object of type UserEarningEvent 
2) Using userId construct a dynamic route
3) Send JSON representation to the dynamic route constructed in 2)



 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Messages-seem-to-contain-more-than-I-expected-tp5738325p5738326.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to