Announcement Announcement Module
Collapse
No announcement yet.
Payload modification within a router Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Payload modification within a router

    I'm having a custom router in this form:

    Code:
    @Router
    public String route(Foo payload) {...}
    If I modify the payload object within this method (say, payload.setDate(new Date())), would that reflect in the actual Message that will be routed?

  • #2
    Yes, but it would be cleaner to use an upstream @Transformer to modify the payload, rather than mixing concerns like this.

    Routers should just route.

    The @Transformer could be another method in the same class

    Comment

    Working...
    X