Configuring Peek Services
The Peek service retrieves a copy of a message without removing the original message from a specified queue. For more information about Peek services, see
Peek Services. You configure
WebSphere MQ Adapter services using
Designer.
To configure a Peek service
2. Start Designer.
3. Using Designer, perform the following:
a. Right-click the package in which the service should be contained and select New > Adapter Service.
b. Select the parent namespace and type a name for the adapter service.
c. Click Next.
4. Select WebSphere MQ Adapter as the adapter type and click Next.
5. Select the appropriate Adapter Connection Name and click Next.
Important:
The peek service requires a non-transactional connection, and does not support transactional connection.
If you are using the adapter with
Integration Server 8.0 SP1 or earlier, adapter services cannot use connections that are also used for adapter listeners.
6. From the list of available templates, select the Peek template and do one of the following:
Select a package and folder to contain the service, type a unique name for the service, and click Finish.
The adapter service editor for the Peek service appears. You can select the Adapter Settings tab at any time to confirm adapter service properties such as Adapter Name, Adapter Connection Name, and Adapter Service Template, as necessary.
7. Select the Peek Service tab to identify message processing features to use with this adapter service.
Specify values for the following fields:
Field | Description/Action |
Wait Interval (msec) | The time period that the service waits for a message to appear on the queue. Enter this value in milliseconds. Default: 60000 |
Convert Application Data? | Select whether the service converts the message to the local character set and encoding: Checked The messages read using this service will be converted to the local character set and encoding. Unchecked The messages read using this service will not be converted to the local character set and encoding. Default: Checked Note: If the property is checked and the message format does not match the local character set and encoding, a warning message appears. Note: If you are using a Peek service configured using WebSphere MQ Adapter, the default value is Checked. |
Throw Exception on Failure? | Select whether the service should throw an exception on failure: Checked Throws an exception when the adapter service returns error codes. Unchecked Returns any error codes or error messages to the service's output signature. Default: Checked |
Reset Cursor before Operation? | The value of the resetCursor is set on the Peek Service tab in Designer. yes The Peek service starts at the beginning of the queue and gets a copy of the first message. no The Peek service retrieves a copy of the next message in the queue relative to the last message that the Peek service retrieved. Default: yes Note: You can also set the value for the Reset Cursor before Operation field in the Pipeline Editor. If you add a value other than yes or no in this field, then WebSphere MQ Adapter automatically sets the value to no. |
8. Select the MQMD Header tab to specify which selectionCriteria property fields and constant values the service will use. Selection criteria refers to the specific values that must be present in the header of the actual message in order for the adapter to retrieve it from the WebSphere MQ.
The selectionCriteria property fields appear on the Input/Output tab in the Input signature document for this adapter service. Use the following icons to manage the rows on the MQMD Header tab:
Select the Insert Row icon
(or the Fill in all rows to the table icon
) to define new selectionCriteria property fields and new output field names.
If necessary, use the Shift Up
or Shift Down
icons to change the order of the selectionCriteria property fields or the output field names to ensure the parameters are parsed in the correct order.
Use the Remove row icon
to delete any selectionCriteria property fields or output field names.
In the Constant Value column, specify default values for any of the property fields. You can override these values at run time.You can add the following optional selectionCriteria property fields:
selectionCriteria Property | Data Type | Maximum Field Length for Constant Value |
CorrelId | String | 24 alphanumeric single-byte characters |
CorrelationByteArray | Byte Array | 24 bytes |
GroupId* | String | 24 alphanumeric single-byte characters |
GroupIdByteArray* | Byte Array | 24 bytes |
MsgId | String | 24 alphanumeric single-byte characters |
MsgIdByteArray | Byte Array | 24 bytes |
MsgSeqNumber | String | 4 digits |
Offset | String | 4 digits |
Note:
An asterisk * indicates that you can enter these properties either as a string or as a byte array. For example, CorrelId and CorrelationByteArray refer to the same msgHeader property. If you specify values for both properties, then the byte array value will be used.
9. The msgHeader property fields appear on the Input/Output tab in the Output signature document for this adapter service. Add the following optional msgHeader property fields to the Output Field Name column:
msgHeader Property | Data Type |
AccountingToken | String |
AccountingTokenByteArray | Byte Array |
ApplIdentityData | String |
ApplOriginData | String |
BackoutCount | String |
CodedCharSetId | String |
CorrelId | String |
CorrelationIdByteArray | Byte Array |
Encoding | String |
Expiry | String |
Feedback | String |
Format | String |
GroupId | String |
GroupIdByteArray | Byte Array |
MsgFlags | String |
MsgId | String |
MsgIdByteArray | Byte Array |
MsgType | String |
MsgSeqNumber | String |
Offset | String |
OriginalLength | String |
Persistence | String |
Priority | String |
PutApplName | String |
PutApplType | String |
PutDate | String |
PutTime | String |
ReplytoQueueMgr | String |
ReplyToQ | String |
Report | String |
UserIdentifier | String |
10. Select the JMS Properties tab to identify the optional JMS property fields for the adapter service. The JMS property fields appear on the Input/Output tab in the Output signature document for this adapter service.
Use the following icons to insert or delete rows:
To define new JMS property fields, select the Insert Row icon
(or the Fill in all rows to the table icon
).
To change the order of JMS property fields to ensure the parameters are parsed in the correct order, use the Shift Up
or Shift Down
icons.
To delete any JMS property fields, use the Remove row icon
.
You can add the following optional JMS property fields:
JMS Property | Data Type |
JMSDestination | String |
JMSExpiration | String |
JMSPriority | String |
JMSDeliveryMode | String |
JMSCorrelationID | String |
JMSCorrelationIDByteArray | Byte Array |
JMSReplyTo | String |
JMSType | String |
JMSMessageID | String |
JMSTimestamp | String |
JMSRedelivered | String |
JMSXGroupID | String |
JMSXGroupIdByteArray | Byte Array |
JMSXGroupSeq | String |
JMSXUserID | String |
JMSXAppID | String |
JMSXDeliveryCount | String |
MCDMessageDomain | String |
MCDMessageSet | String |
MCDMessageFormat | String |
Note:
An "X" in the JMS property name indicates that the property is provider specific. The remaining JMS properties are generic, delivered by any JMS provider.
You can also add your own folders and properties to the JMS Properties.
Use the following icons to manage the rows for User-Defined Properties on the JMS Properties tab:
To define new folders and properties, select the Insert Row icon
.
Enter the new folder and property. For example, enter "jms.usr.usr1". The "jms" and "usr" are the names of the folders and "usr1" is the name of the property.
All the folders and properties you add will be under JMSProperties as part of the output signature of the adapter service.
Note:
The property name has to be prefixed with a folder name. You cannot use "JMSProperties" and "mcd" as the first folder name.
To change the order of User-Defined property fields to ensure the parameters are parsed in the correct order, use the Shift Up
or Shift Down
icons.
To delete any User-Defined property fields, use the Remove row icon
.
When using Designer, Designer contains only the Adapter Settings and Input/Output tabs. The information from the Audit and Permissions tabs appears in the Properties panel, and the information from the Results tab appears in the Service Results panel in Designer. For more information, see the webMethods Service Development Help for your release.
11. From the File menu, select Save.