Results 1 to 2 of 2

Thread: MessageCreator in AMQP

  1. #1
    Join Date
    Feb 2011
    Posts
    1

    Default 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. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •