Announcement Announcement Module
Collapse
No announcement yet.
MessageCreator in AMQP Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MessageCreator in AMQP

    In Amqp Reference Manual for Java, there are some examples with the class MessageCreator in section 1.4. But this class does not exist in Spring AMQP API. Is this and error ?
    Code:
    amqpTemplate.send("quotes.nasdaq.FOO", new MessageCreator() {
        public Message createMessage() {
            return new Message("12.34".getBytes(), someProperties);
        }
    });

  • #2
    That's either a bug in the documentation or a case of the docs getting ahead of the code. There is this:

    Code:
    public void convertAndSend(String exchange, String routingKey, final Object message,
    			final MessagePostProcessor messagePostProcessor)
    and the MessagePostProcessor can be used to add headers etc. Is that what you need?

    Comment

    Working...
    X