Announcement Announcement Module
No announcement yet.
Messages not Being Sent? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Correct; once a durable queue is bound to an exchange, it remains that way until the binding is removed.

    Just to close out the discussion - it is generally advisable to only expose your code to the underlying infrastructure if you really need to. This makes your code

    a. portable
    b. more easily testable

    So, generally, we would advise using the adapter and making your code a simple POJO. Even if you need stuff from the message properties; it is often better to do this in a custom MessageConverter. The method doesn't even have to be 'handleMessage' (that's just the default)...

    public void receiveOrder(Order order);
    That way, to test your code, you only need to make an Order object (you don't have synthesize, or Mock, a Message object), and your business code has no direct dependencies on the Message object.

    Further, you could then take that same object, and drop it into, say, a JMS-based system, or use it as a POJO in a spring integration flow, with no changes needed.


    • #17
      Understood, Gary.

      Thanks again.