JMS message producers are able to provide hints to the JMS broker about possible message optimizations. These hints include whether or not JMS message IDs are required and whether or not timestamps are needed.
By default, Fuse ESB JMS provider endpoints require that messages have IDs and timestamps. However, if your application does not require them you can instruct the endpoint to inform the JMS provider that it can skip the creation of IDs and time stamps. The JMS provider is not required to take the hint.
By default, a JMS message broker generates a unique identifiers for each message that it manages and places the ID in the message's header. These IDs can be used by JMS applications for a number of purposes. One reason to use them is to correlate request and reply messages.
Message IDs take time to create and increase the size of a message. If your application does not require
message IDs, you can optimize it by configuring the endpoint to disable message ID generation by setting the
messageIdEnabled
attribute to false
.
Setting the messageIdEnabled
attribute to false
causes the endpoint to call its message producer's setDisableMessageID()
method with a
value of true
. The JMS broker is then given a hint that it does not need to generate message
IDs or add them to the messages from the endpoint. The JMS broker can choose to accept the hint or ignore it.
By default, a JMS message broker places time stamp representing the time the message is processed into each message's header.
Time stamps increase the size of a message. If your application does not use the timestamps, you can optimize
it by configuring the endpoint to disable time stamp generation by setting the
messageTimeStampEnabled
attribute to false
.
Setting the messageTimeStampEnabled
attribute to
false
causes the endpoint to call its message producer's
setDisableMessageTimestamp()
method with a value of true
. The
JMS broker is then given a hint that it does not need to generate message IDs or add them to the messages from
the endpoint. The JMS broker can choose to accept the hint or ignore it.