Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The core annotations are as follows

Annotation

Meaning

Parameter?

@Body

To bind to an inbound message body

 

@Header

To bind to an inbound message header

String name of the header

@Headers

To bind to the Map of the inbound message headers

 

@OutHeaders

To bind to the Map of the outbound message headers

 

@Property

To bind to a named property on the exchange

String name of hte property

@Properties

To bind to the property map on the exchange

 

For example:

Code Block
public class Foo {
	
    @MessageDriven(uri = "activemq:my.queue")
    public void doSomething(@Header('JMSCorrelationID') String correlationID, @Body String body) {
		// process the inbound message here
    }

}

...