| Quick Reference |
Programs written for EntireX Broker contain instructions that specify to the Broker which functions to perform. The function's behavior is controlled by the option value and other ACI fields.
This document covers the following topics:
See also Broker ACI Fields
| Function Name | Applicable Participant | Logon Required (1) | User ID Required (2) | Minimum API Version | |||
|---|---|---|---|---|---|---|---|
| Client | Server | Publisher | Subscriber | ||||
| CONTROL_PUBLICATION | X | X | X | X | 8 | ||
| DEREGISTER | X | X | 1 | ||||
| EOC | X | X | X | 1 | |||
| KERNELVERS | X | X | X | X | X | 4 | |
| LOCTRANS | X | 6 | |||||
| LOGOFF | X | X | X | X | X | X | 2 |
| LOGON | X | X | X | X | X | 2 | |
| RECEIVE | X | X | (3) | X | 1 | ||
| RECEIVE_PUBLICATION | X | X | X | 8 | |||
| REGISTER | X | X | 1 | ||||
| REPLY_ERROR | X | X | X | 8 | |||
| SEND | X | X | (3) | X | 1 | ||
| SEND_PUBLICATION | X | X | X | 8 | |||
| SETSSLPARMS | X | X | X | X | 6 | ||
| SUBSCRIBE | X | X | X | 8 | |||
| SYNCPOINT | X | X | X(3) | X | 3 | ||
| UNDO | X | X | X | X | 2 | ||
| UNSUBSCRIBE | X | X | X | 8 | |||
| VERSION | X | X | X | X | 2 | ||
| (1) | Logon is a prerequisite for issuing this command. See LOGON. |
| (2) | User ID is a prerequisite for issuing this command. |
| (3) | The following functions require a logon when used with units of work: RECEIVE, SEND, SYNCPOINT. |
This function is used to control a publication.
| Option | Description |
|---|---|
| BACKOUT |
|
| COMMIT |
|
| LAST | Used by the publisher, it returns the status of the last publication sent by the publisher. Only publications for topics with attribute ALLOW-DURABLE=YES will be considered. |
| QUERY | Used by the publisher, it returns the status of the publication specified by the PUBLICATION-ID. |
| SETUSTATUS | Used by the publisher, it updates the optional application-specific user status of the specified publication that is in received status. |
This function is used by a server application to deregister a service from EntireX Broker. Assigned resources are de-allocated. To remove multiple services, specify either SERVER-CLASS, SERVER-NAME and/or SERVICE.
| Option | Description |
|---|---|
| IMMED | To execute a immediate deregistration, use OPTION=IMMED. The service is removed immediately; an error code informs partners in existing conversations of this removal. Any active UOW is backedout. |
| QUIESCE | To execute a non-immediate deregistration, use OPTION=QUIESCE. All active conversations are allowed to continue until an EOC is issued or a conversation timeout occurs. The application that issues the DEREGISTER function must remain active until all existing conversations are ended. No new conversations are accepted |
This function is used by a client or server and applies to conversational mode only. It is used to terminate one or more conversations. EntireX Broker accepts no additional SEND s for the conversation(s). The partner can receive requests and messages that were sent before the EOC was issued.
Although conversations are normally terminated by the client, the EOC function can be issued by either partner in a conversation. If an active UOW has not yet been committed - i.e., its current status is received or delivered - the conversation will not be terminated until the UOW is either committed, backedout, cancelled, or timedout.
To terminate all conversations initiated by the participant, use CONV-ID=ANY.
To terminate all conversations for a particular service, use CONV-ID=ANY, SERVER-CLASS, SERVER-NAME and/or SERVICE.
| Option | Description |
|---|---|
| CANCEL | To inform the partner that the EOC is due to an unexpected event, use OPTION=CANCEL. |
This function is used by any participant to determine the highest API-VERSION that is supported by the requested Broker. The highest API-VERSION that the Broker supports is returned in the API-VERSION field (see: client and server / publish and subscribe). Platform and version information is returned in the error text.
| Option | Description |
|---|---|
| CHECKSERVICE | If option is set to CHECKSERVICE, the command will determine whether a specified SERVICE is currently registered to the Broker. |
The KERNELSECURITY field returns one of the following values to indicate whether the kernel is running with security. These values are returned only for API version 7 or above.
| Value | Description |
|---|---|
| Y | Software AG-supplied security - i.e., SECURITY=YES in Broker attribute file. |
| U | User-written security - i.e., SECURITY=YES in Broker attribute file. |
| N | Security=NO in Broker attribute file. |
This function is used by a client application to determine the location of an available instance of a server application. It determines the location in terms of the BROKER-ID and the actual SERVER-CLASS, SERVER-NAME and SERVICE when provided with a logical service name. See also Location Transparency with EntireX.
The Broker ACI Control Block fields for BROKER-ID, SERVER-CLASS, SERVER-NAME and/or SERVICE must be empty.
The send buffer contains the specification of the logical service or logical Broker in one of the following forms. SetName is optional. The keywords LOGSERVICE= and LOGBROKER= indicate whether to use a logical service or a logical Broker. See also the System Management Hub documentation.
LOGSERVICE=logicalService
In this case DefaultSet is used as the SetName.
LOGSERVICE=logicalService,SetName.
LOGBROKER=logicalBroker
In this case DefaultSet is used as the SetName.
LOGBROKER=logicalBroker,SetName.
The receive buffer and error text buffer can be omitted.
LOCTRANS resolves the logicalService specification by
finding the logicalService;
extracting the SERVER-CLASS, SERVER-NAME and SERVICE definition and a list of BROKER-ID s;
searching (via KERNELVERS) the first active and reachable EntireX Broker, using the retrieved list of BROKER-ID s;
API version 8 and above: If the CHECKSERVICE option is specified, the search is further refined to check whether the resolved SERVER-CLASS, SERVER-NAME and SERVICE are currently registered with EntireX Broker.
If the search is successful, the BROKER-ID and SERVER-CLASS, SERVER-NAME and SERVICE values are available for the application in the corresponding Broker ACI Control Block fields.
LOCTRANS resolves the logicalBroker specification by
searching (via KERNELVERS) the first active and reachable EntireX Broker, using the retrieved list of BROKER-IDs.
If the search is successful, the Broker ID is available for the application in the corresponding Broker ACI Control Block field. The SERVER-CLASS, SERVER-NAME and SERVICE values have to be supplied in the corresponding Broker ACI Control Block fields.
If Location Transparency is being used, LOCTRANS must be the first Broker call. We recommend you use a KERNELVERS call immediately after LOCTRANS to determine the correct Broker ACI version.
Note:
If the application is using SSL communication and Location
Transparency, SETSSLPARMS should be called
immediately following a LOCTRANS call (and before KERNELVERS). However, it is
also possible to specify SSL parameters, using the System Management Hub, in
which case SSLPARMS is not required. See Location
Transparency Administration using System Management Hub under
Windows |
UNIX.
This function is used by all application components before termination when no further Broker functions are to be issued.
LOGOFF should be issued after the application's last SEND, SEND_PUBLICATION, RECEIVE, RECEIVE_PUBLICATION, DEREGISTER or UNSUBSCRIBE has been executed. It releases all resources used by the application immediately rather than waiting until they time out (see: client and server / publish and subscribe).
This function is used by all application components so that the application can establish communication with a particular instance of the Broker kernel.
Allows the client or server application to logon to EntireX Broker, which allocates the necessary structures to handle the new participant. If EntireX Broker is running in a secure environment (with SECURITY=YES in the attribute file), LOGON performs the authentication process.
LOGON is normally the first function unless a LOCTRANS function is issued first to determine the BROKER-ID.
In addition to the USER-ID, the LOGON optionally transmits the PASSWORD, NEWPASSWORD and SECURITY-TOKEN to authenticate itself, provided Security=YES in the Broker attribute file.
This function is used by clients to receive incoming messages and by servers to receive incoming requests.
You can specify a WAIT time, causing the RECEIVE to wait for the request or message that satisfies the operation.
The RECEIVE-LENGTH field is required. It specifies the maximum length of data the caller can receive. A receive buffer of at least this length must be provided. The actual length of the message received is returned in the RETURN-LENGTH field.
| Option | Description | Note |
|---|---|---|
| LAST | To retrieve the last (most recent) message in a conversation, use OPTION=LAST. | With this option, WAIT must be set to NO or not specified. |
| NEXT | To retrieve the next unprocessed request or message in a conversation, use OPTION=NEXT. | |
| MSG | To indicate that the RECEIVE will be satisfied only by a message that is not part of a UOW, use OPTION=MSG. | |
| PREVIEW | To retrieve the next unprocessed request or message in a conversation without deleting the previous message or moving the READ pointer, use OPTION=PREVIEW which excludes using units of work. | |
| SYNC | To receive only messages that are part of a unit of work ( UOW), use OPTION=SYNC. |
This function is used by subscribers to receive publications. If PUBLICATION-ID=NEW is specified, Broker will deliver the next publication in accepted status to the subscriber, if a publication is in accepted status. In the case of subsequent RECEIVE_PUBLICATION commands, a valid PUBLICATION-ID is used to receive any messages from a multi-message publication. See function CONTROL_PUBLICATION,OPTION=COMMIT to acknowledge the publication.
| ACI Field | Description |
|---|---|
| RECEIVE-LENGTH | This field is required. |
| WAIT | You can specify a WAIT time to wait for a new publication. |
This function is used by servers to inform EntireX Broker that a service is available. The Broker obtains information about the service from the Broker attribute file, creates the appropriate environment, and makes the participant available as the specified SERVER-CLASS, SERVER-NAME and SERVICE
If REGISTER is the first call by a server when both AUTOLOGON and SECURITY are set to YES in the Broker attribute file, USER-ID and PASSWORD are required in order to authenticate and authorize the server. This is because an implicit LOGON is being performed.
The services being registered must be defined in the Broker attribute file.
| Option | Description |
|---|---|
| ATTACH | To register an attach service, use OPTION=ATTACH. An attach service cannot be requested by a client. Its function is to make available a service that cannot otherwise be scheduled. |
This function is used by clients or servers to send an error message to the partner of the conversation. The error number is specified in the error code field. The sent message is delivered as an error text; the specified error number is delivered as an error code.
The user must be logged on.
The error number is a numeric 8-byte value and must start with 8 - e.g., 80010001. A zero error number will be rejected. These errors are user-definable and therefore not documented.
The error message is provided in the send buffer and is limited to 40 bytes.
Use the SEND-LENGTH field to specify the length of the error message.
REPLY_ERROR can be used with a valid CONVERSATION-ID only.
Only WAIT=NO is allowed.
The conversation is not allowed to contain units of work.
| Option | Description |
|---|---|
| EOC | To end the conversation after the REPLY_ERROR, use OPTION=EOC. |
This function is used by clients to send requests and by servers to send replies (messages). If a corresponding RECEIVE function issued by a partner application is outstanding, EntireX Broker forwards the request or message to that partner application. If not, EntireX Broker queues the request or message until a suitable RECEIVE is issued by a partner application. If no suitable RECEIVE is issued by a partner application, the request will timeout within the specified timeout period.
You can specify a SEND with either of the following:
WAIT=YES | Value
This causes an implicit RECEIVE to be generated and the SEND to wait for a reply. If a reply is expected, the SEND must pass the length of the receive buffer, in bytes, as the value of the RECEIVE-LENGTH parameter. The actual - not the specified - length of the reply is returned to the sender as the RETURN-LENGTH value.
Choose WAIT=NO if you are only forwarding a request or message.
Use the SEND-LENGTH field to specify the length of the request or message being sent. The specified number of bytes is transferred, starting at the beginning of the send buffer.
The client starts a new conversation, using CONV-ID=NEW.
The client can specify non-conversational mode, using CONV-ID=NONE.
Include the SERVER-CLASS, SERVER-NAME and SERVICE if this is a new conversation or a non-conversational request.
If you add the ENVIRONMENT parameter, its value is passed to the translation routine for the service.
To transmit conversation-related data to the sending application, use USER-DATA.
| Option | Description | Note |
|---|---|---|
| COMMIT | Use OPTION=COMMIT to indicate that the UOW being sent is complete and can now be delivered to the intended receiver, which can be either client or server. | |
| EOC | To end the conversation after the SEND, use OPTION=EOC. | WAIT must be NO or not specified. |
| HOLD | To hold SEND data in a queue, use OPTION=HOLD. The data is released by a SEND without a HOLD. | WAIT must be NO or not specified. |
| SYNC | Client and server can send a message as part of a unit of work (UOW), using OPTION=SYNC. | WAIT must be NO or not specified. |
This function is used by publishers to create publications for a specified topic. PUBLICATION-ID=NEW is used to create a new publication. In the case of a subsequent SEND_PUBLICATION, a valid PUBLICATION-ID is used when sending a multi-message publication. The publisher completes the publication either by specifying SEND_PUBLICATION,OPTION=COMMIT or using the function CONTROL_PUBLICATION,OPTION=COMMIT. If SEND_PUBLICATION,OPTION=COMMIT is used, the option is specified on the final SEND_PUBLICATION in the sequence.
| Option/ ACI Field | Description |
|---|---|
| OPTION=COMMIT | Required to complete a publication if the function CONTROL_PUBLICATION is not used. |
| PUBLICATION-ID=NEW | Required to start a new publication. |
| SEND-LENGTH | Required. |
This function is used by clients and servers to set the SSL parameters. It can be called whenever the transport method SSL is available.
If the application is using SSL communication, SETSSLPARMS should be the called immediately following an LOCTRANS.
Note:
However, it is also possible to specify SSL parameters using the
System Management Hub, in which case SSLPARMS is not required. See
Location Transparency Administration using System Management
Hub under
UNIX |
Windows.
The SSL parameters are specified in the send buffer, (second parameter of the Broker ACI call). These SSL parameters are used and communication is performed if the Secure Sockets Layer is configured. See: z /OS | Windows | UNIX.
This function is used to request EntireX Broker to subscribe to a specific topic. The Broker attribute file contains parameters which specify the behavior of the topic. If Broker runs with the setting SECURITY=YES in the Broker attribute file, the user must be be successfully authenticated by EntireX Broker and also authorized to subscribe to the specific topic.
It is not possible to use a TOPIC name unless it is defined in the Broker attribute file.
| Option | Description |
|---|---|
| DURABLE | If durable is specified within the SUBSCRIBE command, users need
to subscribe only once to a topic. The subscription is retained after the user
issues a logoff command or if the subscriber has timed out. Similarly, the
subscription remains if Broker is restarted. All publications necessary to meet
subscription requirements are also retained. If a subscriber no longer wishes
to subscribe to a topic, it must issue an
UNSUBSCRIBE command;
otherwise the subscription remains valid until the subscription expiration time
has passed.
Durable subscription requires the administrator to configure the Persistent Store. In addition, the topic must be specified as durable within the Broker attribute file. |
ALLOW-DURABLE=YES is a topic-specified attribute parameter that determines whether a subscriber is allowed to perform a durable subscription to a topic. If users are allowed to durably subscribe to any topic, you must specify a value for the SUBSCRIBER-STORE parameter.
This function allows you to manage units of work (UOW), both persistent and non-persistent, that have been sent or received.
SYNCPOINT is used with the OPTION field. The UOW-ID parameter is required and normally limits the request to a specified UOW. For example:
SYNCPOINT OPTION=COMMIT,UOW-ID=n
SYNCPOINT OPTION=BACKOUT,UOW-ID=n
In cases where a server receives a UOW and sends a different UOW, you can ensure that the two UOWs will be processed together (i.e., if one is committed, both are committed) by specifying UOW-ID =BOTH. For example:
SYNCPOINT OPTION=COMMIT,UOW-ID=BOTH
UOW-ID =BOTH can also be used with OPTION=BACKOUT. This simply backs out both UOWs in a single call instead of two separate calls:
SYNCPOINT OPTION=BACKOUT,UOW-ID=BOTH
| Option | Description |
|---|---|
| BACKOUT | Used by the sender, it causes the
UOW
to be deleted, with a status of backedout. By the receiver, causes the UOW to be returned to its prior, unreceived state, with a status of accepted. The ADCOUNT field is incremented. |
| CANCEL | Used by the receiver, it causes the
UOW
to be considered finished, with a status of cancelled. No further
processing of the UOW is possible. The sender can cancel the UOW if, and only
if, it is in accepted status. The following sequence of commands,
issued during recovery processing, allows the sender to remove any created but
undelivered UOWs:
|
| COMMIT | User by the sender, it indicates that the UOW has been completely built and can be made available for delivery, with a status of accepted. By the receiver, indicates that the UOW has been completely received, with a status of processed. No further processing of the UOW is possible. |
| EOC | With UOW-ID=n, commits the UOW being created and ends the conversation. |
| EOCCANCEL | With UOW-ID=n, commits the UOW being created and cancels the conversation - i.e., terminates the conversation immediately. |
| DELETE | With UOW-ID=n, deletes the persistent status of the specified UOW. The UOW must be logically complete ( processed, cancelled, timedout, backedout, discarded) and must have been created by the caller. |
| LAST | Returns the status of the last UOW sent by the caller. In addition, SERVER-CLASS, SERVER-NAME and SERVICE details of the associated server are also returned. The CONV-ID can be included to qualify the request. |
| QUERY | With UOW-ID=n, returns the status of the specified UOW. In addition, SERVER-CLASS, SERVER-NAME and SERVICE details of the associated server are also returned. |
| SETUSTATUS | With UOW-ID=n, updates the user status of the specified UOW. |
This function is used to remove messages that have been sent but not received. It can only be used with an existing conversation. When a message is undone, the conversation continues.
Note:
UNDO is not used in conjunction with
Units of Work.
| Option | Description |
|---|---|
| HOLD | To undo messages in HOLD status, use UNDO with OPTION=HOLD. |
This function is used to cancel the subscription to a specific topic. The fully specified topic name is required to execute the UNSUBSCRIBE request.
This function is used to return the version of the stub implementation in the receive buffer. This version string is useful to the application in determining the maximum version supported by the stub and to Software AG's support staff if problems occur.
Returns the maximum API-VERSION of the Broker stub being used.
| Number | Option | Description |
|---|---|---|
| 1 | MSG | Used with a RECEIVE function to receive only a message that is not part of a UOW. |
| 2 | HOLD | Used in conversational mode only. |
| 3 | IMMED | Used with the DEREGISTER function to immediately terminate all conversations for the specified server. All partners are informed with an appropriate error code. |
| 4 | QUIESCE | Used with the DEREGISTER function to terminate a server smoothly. Existing conversations are allowed to end normally; no new conversations are accepted. The server is removed from the "active" list. QUIESCE is the default option for the DEREGISTER function. |
| 5 | EOC | Used with the SEND function to end the conversation with the current message. It can be issued by either partner. The conversation is not ended if an active UOW has not yet been committed - i.e., its status is received or delivered. |
| 6 | CANCEL | Used with the EOC function to abort a conversation rather than terminate normally. The receiver of a UOW can use SYNCPOINT OPTION=CANCEL to interrupt processing and discard the UOW. |
| 7 | LAST |
|
| 8 | NEXT | Used with the RECEIVE function to retrieve the next unprocessed request or message. The request or message is then considered processed and can be accessed only with OPTION=LAST. NEXT is the default option for the RECEIVE function. |
| 9 | PREVIEW | Used with the RECEIVE function to retrieve the next unprocessed request message without deleting the previous message or moving the READ pointer. The previewed message will be retrieved again by the next RECEIVE OPTION= NEXT. |
| 10 | COMMIT |
|
| 11 | BACKOUT |
|
| 12 | SYNC | On a SEND function, indicates that the message is part of a UOW. On a RECEIVE function, indicates that the RECEIVE will be satisfied only by a message that is part of a UOW. |
| 13 | ATTACH | Used with the REGISTER function to register an attach server. |
| 14 | DELETE | Used with the SYNCPOINT function to delete the persistent status information for the specified UOW. |
| 15 | EOCCANCEL | Used with the SYNCPOINT function to cancel the conversation after committing a UOW. |
| 16 | QUERY |
|
| 17 | SETUSTATUS |
|
| 18 | ANY | Used with the RECEIVE function to indicate that the RECEIVE will be satisfied by a message that is or is not part of a UOW. |
| 19 | No longer used. | |
| 20 | DURABLE | Used with the SUBSCRIBE function to establish a durable subscription to a topic with attribute ALLOW-DURABLE=YES. |
| 21 | CHECKSERVICE | Use with the KERNELVERS and LOCTRANS functions to check if the specified service is active in EntireX Broker. |
The following table identifies the ACI fields that apply to each of the Broker functions. For a given function, an ACI field value may be a request field (RQ), and/or a reply field (RT). Optional fields are marked (OP).
| ACI Field | Function | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ADCOUNT | RT | RT | RT | RT | RT | ||||||||||||||
| API-TYPE | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ |
| API-VERSION | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ/RT | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ |
| BROKER-ID | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | RQ | ||
| CLIENT-UID | RT | RT | |||||||||||||||||
| COMMITTIME | RT | RT | RT | RT | RT | RT | |||||||||||||
| COMPRESSLEVEL | OP/RT | OP/RT | OP/RT | OP/RT | OP | ||||||||||||||
| CONV-ID | RQ | RQ | RQ | RQ | RQ/RT | RQ | |||||||||||||
| CONV-STAT | RT | RT | |||||||||||||||||
| DATA-ARCH | OP | OP | OP | OP | OP | ||||||||||||||
| ENCRYPTION-LEVEL | OP | OP | OP | OP | |||||||||||||||
| ENVIRONMENT | OP | OP | OP | OP | OP | ||||||||||||||
| ERROR-CODE | |||||||||||||||||||