|
|
EADELIA |
||
(B) (C) |
Section for use
onStart / onStop / onError / onMessage
Syntax
BRK_GET_CONF PropertyName <result variable>
PropertyName |
→ |
SpecialValue | AlphaPropertyName |
SpecialValue |
→ |
*BRK_NAME | *BRK_PROTOCOL | *BRK_VERSION | *BRK_IMPL |
Description
This instruction gets information about the execution context of the Adelia subscriber. Each item of information is defined by a key (PropertyName parameter) and has an associated typed value (the result variable parameter).
The key can either be defined by a special value or, in the case of AlphaPropertyName, by an alphanumeric variable or alphanumeric literal.
Special value key
Special value | Property description | Property type |
---|---|---|
*BRK_NAME | Name of the message broker the subscriber is connected to | ALPHA(n) |
*BRK_PROTOCOL | Name of the protocol used to exchange messages between the broker and subscriber | ALPHA(n) |
*BRK_VERSION | Version of the protocol used to exchange messages between the broker and subscriber | ALPHA(n) |
*BRK_IMPL | Native subscriber implementation identifier enabling communication between the broker and the Adelia subscriber | ALPHA(n) |
Depending on the target message broker, these special values have the following values:
Message broker | *BRK_NAME | *BRK_PROTOCOL | *BRK_VERSION | *BRK_IMPL |
---|---|---|---|---|
Kafka | KAFKA | KAFKA | 2.8.0 | org.apache.kafka:kafka-clients:2.8.0 |
MQTT v3 | MQTT_BROKER | MQTT | 3.1.1 | org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5 |
MQTT v5 | MQTT_BROKER | MQTT | 5 | org.eclipse.paho:org.eclipse.paho.mqttv5.client:1.2.5 |
Nats Jetsteam | NATS JETSTREAM | NATS JETSTREAM | 2.6.2 | io.nats:jnats:2.12.0 |
Nats Streaming | NATS STREAMING | NATS STREAMING | 2.2 | io.nats:java-nats-streaming:2.2.3 |
RabbitMQ AMQP | RABBITMQ | AMQP | 0.9.1 | com.rabbitmq:amqp-client:5.7.3 |
Redis Pub/Sub | REDIS | REDIS | 2.6 | io.lettuce:lettuce-core:6.1.6.RELEASE |
Alphanumeric key
When the key is alphanumeric, it can either designate a standard property present in all the Adelia subscribers or a specific property relating to the associated message broker.
Standard key
The value is an alphanumeric string representing an XPath expression and designating a property relating to a subscriber definition.
Key value | Property description | Property type |
---|---|---|
subconf/id | Adelia subscriber identifier | ALPHA(n) |
subconf/startOnCreation | Specifies if the Adelia subscriber needs to be started on creation | BOOL |
subconf/config | ||
subconf/config | Adelia subscriber configuration (exportable) | N / A |
subconf/config/adeliaPoolName | Name of the Adelia pool used to configure DB connections in the associated EADELIA program | ALPHA(n) |
subconf/config/adeliaPgm | ||
subconf/config/adeliaPgm | Configuration of the EADELIA program associated with the subscriber | N / A |
subconf/config/adeliaPgm/objectFileName | Name of the object file resulting from the generation of the associated EADELIA program | ALPHA(6) |
subconf/config/adeliaPgm/javaPackage | Name of the Java package defined for the generation of the associated EADELIA program | ALPHA(256) |
subconf/config/adeliaPgm/parameters | List of alphanumeric parameters passed to the associated EADELIA program during execution | ALPHA(n) array |
subconf/config/adeliaPgm/parameters[<index commençant à 1] | Value of the <index> index parameter in the list of alphanumeric parameters passed to the associated EADELIA program during execution | ALPHA(n) |
subconf/config/adeliaPgm/customObjectMapper | Java Bean ID defined in the beans-context.xml file, used to configure the properties to convert a JSON object to an Adelia class instance | ALPHA(n) |
subconf/config/brokerConfig/factory | ||
subconf/config/brokerConfig/factory | Information on the factory in charge of creating the Adelia subscriber | N / A |
subconf/config/brokerConfig/factory/id | ID of the factory used to create the Adelia subscriber | ALPHA(n) |
subconf/config/brokerConfig/factory/parameters/<nom parametre> | Value associated with the <parameter name> parameter passed to the associated factory during creation. The parameter name depends on the factory. | The type depends on the associated factory. |
adelUtils:mapKeys(subconf/config/brokerConfig/factory/parameters) | List of names of parameters passed to the associated factory during creation | ALPHA(n) array |
adelUtils:mapValues(subconf/config/brokerConfig/factory/parameters) | List of values of parameters passed to the associated factory during creation | One-dimensional array. The type depends on the associated factory. The type must be the same for all parameters |
Specific key
Like a standard key, its value is an alphanumeric string representing an XPath expression. A specific key is used to designate a property relating to message broker connection information and information for subscribing to the message categories the subscriber wants to handle. Each specific key therefore depends on the target broker (and the associated factory):
. Kafka
. MQTT v3
. MQTT v5
. Nats Jetstream
. Nats Streaming
. RabbitMQ AMQP
. Redis Pub/Sub
When this instruction is executed, the *RETURN_CODE reserved word can take the following values:
0 (*NORMAL) |
Operation completed successfully. |
-1 |
Internal error. |
-2 |
XPath syntax error when evaluating the PropertyName parameter. |
-3 |
The reserved word parameter is not known. |
-4 |
The key corresponds to information that does not exist or has no value. |
-11 | The value associated with the key cannot be converted to Adelia type. |
-32 | The result variable must be an ALPHA or REF_CLASS type variable. |
-33 | The ALPHA result variable is too short. |
-53 | The result variable must be a numeric variable. |
-54 | The NUM_E/NUM_P result variable is too small. |
-55 | The integer part of the NUM_E/NUM_P result variable is too small. |
-56 | The decimal part of the NUM_E/NUM_P result variable is too small. |
-57 | The result variable has a type which is incompatible with a numeric value. |
-58 | The NUM_BIN_2 result variable is too small. |
-59 | The NUM_BIN_4 result variable is too small. |
-60 | The NUM_BIN_8 result variable is too small. |
-61 | The value associated with the key cannot be converted to TIMESTAMP type. |
-74 | The result variable must be a Boolean variable. |
-95 | The result variable must be a DATE, TIME or TIMESTAMP variable. |
-116 | The result variable must be an IMAGE variable. |
-117 | The value associated with the key cannot be converted to a byte array. |
-137 | The resulting variable must be a REF_CLASS variable. |
-138 | The value associated with the key cannot be converted to an Adelia class. |
-300 | The result variable must be an array variable. |
-301 | The result variable must be a one-dimensional array variable. |
-302 | The array result variable is too small. |
-303 | The combo box items have a type that cannot be converted to a numerical value. |
-304 | The combo box items have a type that cannot be converted to an alphanumeric value. |
-305 | The combo box items have a type that cannot be converted to a Boolean value. |
-306 | The combo box items have a type that cannot be converted to an image value. |
-307 | The combo box items have a type that cannot be converted to an Adelia class value. |
-308 | The result variable type is not supported. |
-309 | The key's combo box items have a type that cannot be converted to a date/time/timestamp value. |
-332 | The result array variable must be ALPHA or REF_CLASS type. |
-333 | The alphanumeric length of the ALPHA result array variable is too short. |
-353 | The result array variable must be numeric. |
-354 | The NUM_E/NUM_P result array variable defines numerics that are too small. |
-355 | The NUM_E/NUM_P result array variable defines numerics with an integer part that is too small. |
-356 | The NUM_E/NUM_P result array variable defines numerics with a decimal part that is too small. |
-357 | The combo box items have a type that cannot be converted to a numerical value. |
-358 | The NUM_BIN_2 result array variable defines integers that are too small. |
-359 | The NUM_BIN_4 result array variable defines integers that are too small. |
-360 | The NUM_BIN_8 result array variable defines integers that are too small. |
-361 | The key's combo box items have a value that cannot be converted to TIMESTAMP type. |
-374 | The result array variable must be Boolean type. |
-395 | The result array variable must be date, time or timestamp type. |
-416 | The result array variable must be image type. |
-417 | The key's combo box items have a type that cannot be converted to a byte array. |
-437 | The result array variable must be REF_CLASS type. |
-438 | The key's combo box items have a type that cannot be converted to an Adelia class. |
-600 | The value associated with the key cannot be converted to Adelia type. |
-621 | The alphanumeric value associated with the key cannot be deserialized to an Adelia class. |
-642 | The numeric value associated with the key cannot be converted to Adelia numeric type. |
-705 | Error when retrieving the byte array from a ByteBuffer instance. |
-706 | The ByteBuffer instance has no accessible byte array. |
-707 | The byte array value associated with the key cannot be deserialized to an Adelia class. |
-900 | The value associated with the key cannot be converted to Adelia type. |
-1521 | The alphanumeric value associated with the key cannot be deserialized to an Adelia class. |
-1542 | The numeric value associated with the key cannot be converted to Adelia numeric type. |
-1605 | Error when retrieving the byte array from a ByteBuffer instance. |
-1606 | The ByteBuffer instance has no accessible byte array. |
-1607 | The byte array value associated with the key cannot be deserialized to an Adelia class. |
For example
* Broker name retrieval
ALPHA(128) BROKER_NAME
BRK_GET_CONF *BRK_NAME BROKER_NAME
* Subscriber name retrieval
ALPHA(128) SUBSCRIBER_ID
BRK_GET_CONF 'subconf/id' SUBSCRIBER_ID
* List of subscribed topics retrieval
ALPHA(64) TOPICS_ARRAY (3)
BRK_GET_CONF 'subconf/config/brokerConfig/subscribeTopic/topics' TOPICS_ARRAY