std.GetNextCPMessage

This job returns the next pending content/processing message from the given queues and reserves it for the calling service instance. It is called in a polling loop by full-text indexers, the rendition cache and comparable workers to pull jobs from the server-side oscpmqueue table.

Selection, locking and coalescing behaviour as well as the complete lifecycle of a CP message are described under Capture and Processing Messages (CP).

This job is not listed in the official enaio® standard engine overview (std).

1. Input Parameters

Name Type Required Description

QueueNames

STRING

Yes

Name of the queue from which to fetch the next message. A comma-separated list of multiple queue names is permitted; in that case the most recent free message across the listed queues is returned.

ServiceName

STRING

Yes

Identifier (instance ID) of the calling service instance. On a successful pickup it is stored as lock_service on the message and identifies the instance for follow-up operations such as std.DispatchCPMessage and std.ResetServiceCPMessages. Must be unique per worker instance.

Flags

INT

Yes

Reserved; always pass 0.

[OutputUnicode]

INT

No

1 — string fields in the output are returned as UTF-16. Default: ANSI.

2. Output Parameters

The fields below are only returned if a message could be reserved. If no free message is currently available in the requested queues, the job returns just an empty MessageGUID; the remaining fields are then absent.

Name Type Dependency Description

MessageGUID

STRING

GUID of the reserved message (hex, 32 characters, no separators). Identifies the message for subsequent calls — in particular the acknowledgement via std.DispatchCPMessage. Empty string if no message was available.

[ObjectID]

INT

Only on a successful pickup

Numeric ID of the DMS object the message refers to.

[ObjectType]

INT

Only on a successful pickup

Object type ID of the DMS object.

[QueueName]

STRING

Only on a successful pickup

Actual queue name the message came from — relevant when QueueNames was passed as a comma-separated list.

3. Return Value

(INT): 0 = job successful, otherwise error code. An empty MessageGUID is also a success case — it just means there is currently no pending message.