Creating a message properties context

The message properties context specifies connection information for the underlying Java™ Message Service (JMS) client method call that retrieves the message when you call the ReceiveJMSMessage function.

You pass this context as a parameter when you call the ReceiveJMSMessage function in a policy. The following table shows the properties that you can set in the message properties context:

Table 1. Message Properties Context 

Property

Description

MessageSelector

String expression that specifies which message in the topic or queue you want to retrieve. The message selector syntax is similar to the contents of an SQL WHERE clause and is defined in the JMS specification.

Timeout

Specifies the length of time that a message is retained by the JMS delivery system before it expires. Default value is 0, which indicates an unlimited message lifetime.

You can create an empty message properties context by passing the NewObject function to the ReceiveJMSMessage as a parameter.

The following example shows how to create a message properties context.

// Call NewObject to create the next context
MsgProps = NewObject();

// Assign a message selector that filters the message to
// retrieve

MsgProps.MessageSelector = "color = 'green' AND custom2 = '1234543'";