Firstly, you must import CommonFactory class:
import com.exactpro.th2.common.schema.factory.CommonFactory
Then you will create an instance of imported class, by choosing one of the following options:
-
Create factory with configs from the
th2.common.configuration-directory
environment variable or default path (/var/th2/config/*
):var factory = CommonFactory();
-
Create factory with configs from the specified arguments:
var factory = CommonFactory.createFromArguments(args);
You can use one of the following groups of arguments. Arguments from different groups cannot be used together.
The first group:
- --rabbitConfiguration - path to json file with RabbitMQ configuration
- --messageRouterConfiguration - path to json file with configuration for MessageRouter
- --grpcRouterConfiguration - path to json file with configuration for GrpcRouter
- --cradleConfiguration - path to json file with configuration for Cradle
- --customConfiguration - path to json file with custom configuration
- --dictionariesDir - path to the directory which contains files with the encoded dictionaries
- --prometheusConfiguration - path to json file with configuration for prometheus metrics server
- --boxConfiguration - path to json file with boxes configuration and information
- -c/--configs - folder with json files for schemas configurations with special names.
If you doesn't specify -c/--configs common factory uses configs from the
th2.common.configuration-directory
environment variable or default path (/var/th2/config/*
)
- rabbitMq.json - configuration for RabbitMQ
- mq.json - configuration for MessageRouter
- grpc.json - configuration for GrpcRouter
- cradle.json - configuration for cradle
- custom.json - custom configuration
The second group:
- --namespace - the namespace in Kubernetes to search config maps
- --boxName - the name of the target th2 box placed in the specified Kubernetes namespace
- --contextName - the context name to search connect parameters in Kube config
- --dictionaries - the mapping between a dictionary in infra schema and a dictionary type in the format:
--dictionaries <dictionary name>=<dictionary type >[ <dictionary name>=<dictionary type >]
. It can be useful when you required dictionaries to start a specific box.
Their usage is disclosed further.
-
Create factory with a namespace in Kubernetes and the name of the target th2 box from Kubernetes:
var factory = CommonFactory.createFromKubernetes(namespace, boxName);
It also can be called by using
createFromArguments(args)
with arguments--namespace
and--boxName
. -
Create factory with a namespace in Kubernetes, the name of the target th2 box from Kubernetes and the name of context to choose from Kube config:
var factory = CommonFactory.createFromKubernetes(namespace, boxName, contextName);
It also can be called by using
createFromArguments(args)
with arguments--namespace
,--boxName
and--contextName
. ContextName parameter is@Nullable
; if it is set to null, the current context will not be changed.
The CommonFactory
reads a RabbitMQ configuration from the rabbitMQ.json file.
- host - the required setting defines the RabbitMQ host.
- vHost - the required setting defines the virtual host that will be used for connecting to RabbitMQ. Please see more details about the virtual host in RabbitMQ via link
- port - the required setting defines the RabbitMQ port.
- username - the required setting defines the RabbitMQ username. The user must have permission to publish messages via routing keys and subscribe to message queues.
- password - the required setting defines the password that will be used for connecting to RabbitMQ.
- exchangeName - the required setting defines the exchange that will be used for sending/subscribing operation in MQ routers. Please see more details about the exchanges in RabbitMQ via link
- connectionTimeout - the connection TCP establishment timeout in milliseconds with its default value set to 60000. Use zero for infinite waiting.
- connectionCloseTimeout - the timeout in milliseconds for completing all the close-related operations, use -1 for infinity, the default value is set to 10000.
- maxRecoveryAttempts - this option defines the number of reconnection attempts to RabbitMQ, with its default value set
to 5.
The
th2_readiness
probe is set to false and publishers are blocked after a lost connection to RabbitMQ. Theth2_readiness
probe is reverted to true if the connection will be recovered during specified attempts otherwise theth2_liveness
probe will be set to false. - minConnectionRecoveryTimeout - this option defines a minimal interval in milliseconds between reconnect attempts, with its default value set to 10000. Common factory increases the reconnect interval values from minConnectionRecoveryTimeout to maxConnectionRecoveryTimeout.
- maxConnectionRecoveryTimeout - this option defines a maximum interval in milliseconds between reconnect attempts, with its default value set to 60000. Common factory increases the reconnect interval values from minConnectionRecoveryTimeout to maxConnectionRecoveryTimeout.
- retryTimeDeviationPercent - specifies random deviation to delay interval duration. Default value is 10 percents.
E.g. if delay interval is 30 seconds and
retryTimeDeviationPercent
is 10 percents the actual duration of interval will be random value from 27 to 33 seconds. - prefetchCount - this option is the maximum number of messages that the server will deliver, with its value set to 0 if unlimited, the default value is set to 10.
- messageRecursionLimit - an integer number denotes how deep the nested protobuf message might be, set by default 100
{
"host": "<host>",
"vHost": "<virtual host>",
"port": 5672,
"username": "<user name>",
"password": "<password>",
"exchangeName": "<exchange name>",
"connectionTimeout": 60000,
"connectionCloseTimeout": 10000,
"maxRecoveryAttempts": 5,
"minConnectionRecoveryTimeout": 10000,
"maxConnectionRecoveryTimeout": 60000,
"retryTimeDeviationPercent": 10,
"prefetchCount": 10,
"messageRecursionLimit": 100
}
The CommonFactory
reads a message's router configuration from the mq.json
file.
-
queues - the required settings defines all pins for an application
-
name - routing key in RabbitMQ for sending
-
queue - queue's name in RabbitMQ for subscribe
-
exchange - exchange in RabbitMQ
-
attributes - pin's attribute for filtering. Default attributes:
- first
- second
- subscribe
- publish
- parsed
- raw
- store
- event
-
filters - pin's message's filters
- metadata - a metadata filters
- message - a message's fields filters
-
-
globalNotification - notification exchange in RabbitMQ
- exchange -
global-notification
by default
- exchange -
Filters format:
- fieldName - a field's name
- expectedValue - expected field's value (not used for all operations)
- operation - operation's type
EQUAL
- the filter passes if the field is equal to the exact valueNOT_EQUAL
- the filter passes if the field is not equal to the exact valueEMPTY
- the filter passes if the field is emptyNOT_EMPTY
- the filter passes if the field is not emptyWILDCARD
- filters the field by wildcard expressionNOT_WILDCARD
- filters the field which isn't matched by wildcard expression
{
"queues": {
"pin1": {
"name": "routing_key_1",
"queue": "queue_1",
"exchange": "exchange",
"attributes": [
"publish",
"subscribe"
],
"filters": {
"metadata": [
{
"fieldName": "session-alias",
"expectedValue": "connection1",
"operation": "EQUAL"
}
],
"message": [
{
"fieldName": "checkField",
"expectedValue": "wil?card*",
"operation": "WILDCARD"
}
]
}
},
"globalNotification": {
"exchange": "global-notification"
}
}
}
The CommonFactory
reads a gRPC router configuration from the grpc_router.json
file.
- enableSizeMeasuring - this option enables the gRPC message size measuring. Please note the feature decreases gRPC throughput. Default value is false.
- keepAliveInterval - number of seconds between keep alive messages. Default value is 60
- maxMessageSize - this option enables endpoint message filtering based on message size (message with size larger than
option value will be skipped). By default, it has a value of
4 MB
. The unit of measurement of the value is number of bytes. - retryConfiguration - this settings aria is responsible for how a component executes gRPC retries before gives up with exception.
Component executes request attempts with growing timeout between them until success or attempts over
- maxAttempts - number of attempts before give up
- minMethodRetriesTimeout - minimal timeout between retry in milliseconds
- maxMethodRetriesTimeout - maximum timeout between retry in milliseconds
{
"enableSizeMeasuring": false,
"keepAliveInterval": 60,
"maxMessageSize": 4194304,
"retryConfiguration": {
"maxAttempts": 60,
"minMethodRetriesTimeout": 100,
"maxMethodRetriesTimeout": 120000
}
}
The CommonFactory
reads a gRPC configuration from the grpc.json
file.
- services - grpc services configurations
- server - grpc server configuration
- endpoint - grpc endpoint configuration
{
"services": {
"test": {
"endpoints": {
"endpoint": {
"host": "host",
"port": 12345,
"attributes": [
"test_attr"
]
}
},
"service-class": "com.exactpro.th2.common.schema.grpc.configuration.GrpcConfiguration",
"strategy": {
"endpoints": [
"endpoint"
],
"name": "robin"
}
}
},
"server": {
"host": "host123",
"port": 1234,
"workers": 58
}
}
The CommonFactory
reads a Cradle configuration from the cradle.json file.
- dataCenter - the required setting defines the data center in the Cassandra cluster.
- host - the required setting defines the Cassandra host.
- port - the required setting defines the Cassandra port.
- keyspace - the required setting defines the keyspace (top-level database object) in the Cassandra data center.
- username - the required setting defines the Cassandra username. The user must have permission to write data using a specified keyspace.
- password - the required setting defines the password that will be used for connecting to Cassandra.
- cradleMaxEventBatchSize - this option defines the maximum event batch size in bytes with its default value set to 1048576.
- cradleMaxMessageBatchSize - this option defines the maximum message batch size in bytes with its default value set to 1048576.
- timeout - this option defines connection timeout in milliseconds. If set to 0 or omitted, the default value of 5000 is used.
- pageSize - this option defines the size of the result set to fetch at a time. If set to 0 or omitted, the default value of 5000 is used.
- prepareStorage - enables database schema initialization if Cradle is used. By default, it has a value of
false
{
"dataCenter": "<datacenter>",
"host": "<host>",
"port": 9042,
"keyspace": "<keyspace>",
"username": "<username>",
"password": "<password>",
"cradleMaxEventBatchSize": 1048576,
"cradleMaxMessageBatchSize": 1048576,
"timeout": 5000,
"pageSize": 5000,
"prepareStorage": false
}
-
It is necessary to have Kubernetes configuration written in ~/.kube/config. See more on kubectl configuration here.
-
Also note that
generated_configs
directory will be created to store.json
files with configs from Kubernetes. Those files are overridden whenCommonFactory.createFromKubernetes(namespace, boxName)
andCommonFactory.createFromKubernetes(namespace, boxName, contextName)
are invoked again. -
Users need to have authentication with the service account token that has the necessary access to read CRs and secrets from the specified namespace.
After that you can receive various Routers through factory properties:
var protoMessageGroupRouter = factory.getMessageRouterMessageGroupBatch();
var protoMessageRouter = factory.getMessageRouterParsedBatch();
var protoRawRouter = factory.getMessageRouterRawBatch();
var protoEventRouter = factory.getEventBatchRouter();
var transportGroupRouter = factory.getTransportGroupBatchRouter();
protoMessageGroupRouter
is working with MessageGroupBatch
protoMessageRouter
is working with MessageBatch
protoRawRouter
is working with RawMessageBatch
protoEventRouter
is working with EventBatch
transportGroupRouter
is working with GroupBatch
Note: MessageRouterParsedBatch and MessageRouterRawBatch are not recommended to use because they are adapters for MessageRouterMessageGroupBatch and execute additional repacking
Please refer to th2-grpc-common for further details.
With the router created, you can subscribe to pins (by specifying the callback function) or to send data that the router works with:
router.subscribe(callback) # subscribe to only one pin
router.subscribeAll(callback) # subscribe to one or several pins
router.send(message) # send to only one pin
router.sendAll(message) # send to one or several pins
You can perform these actions by providing pin attributes in addition to the default ones.
router.subscribe(callback, attrs...) # subscribe to only one pin
router.subscribeAll(callback, attrs...) # subscribe to one or several pins
router.send(message, attrs...) # send to only one pin
router.sendAll(message, attrs...) # send to one or several pins
The default attributes are:
proto_message_group_batch_router
- Subscribe:
subscribe
- Send:
publish
- Subscribe:
proto_message_parsed_batch_router
- Subscribe:
subscribe
,parsed
- Send:
publish
,parsed
- Subscribe:
proto_message_raw_batch_router
- Subscribe:
subscribe
,raw
- Send:
publish
,raw
- Subscribe:
proto_event_batch_router
- Subscribe:
subscribe
,event
- Send:
publish
,event
- Subscribe:
transport_group_message_batch_router
- Subscribe:
subscribe
,transport-group
- Send:
publish
,transport-group
- Subscribe:
This library allows you to:
This kind of router provides the ability for boxes to interact between each other via gRPC interface.
gRPC router rises a gRPC server with enabled grpc-service-reflection since the 3.38.0 version. It means that the users can execute calls from the console or through scripts via grpcurl without gRPC schema (files with proto extensions describes gRPC service structure)
This kind of router provides the ability for component to send / receive messages via RabbitMQ. Router has several methods to subscribe and publish RabbitMQ messages steam (th2 use batches of messages or events as transport). Supports recovery of subscriptions cancelled by RabbitMQ due to following errors: "delivery acknowledgement timed out" and "queue not found".
Pin attributes are key mechanism to choose pin for action execution. Router search all pins which have full set of passed attributes.
For example, the pins: first
[publish
, raw
, custom_a
], second
[publish
, raw
, custom_b
].
- only the
first
pin will be chosen by attribut sets: [custom_a
], [custom_a
,raw
], [custom_a
,publish
], [publish
,raw
,custom_a
] - both pins will be chosen by attribut sets: [
raw
], [publish
], [publish
,raw
]
Router implementation and methods have predefined attributes. Result set of attributes for searching pin is union of , , attributes. Predefined attributes:
-
RabbitMessageGroupBatchRouter
hasn't got any predefined attributes -
EventBatchRouter
hasevnet
attribute -
TransportGroupBatchRouter
hastransport-group
attribute -
send*
excludesendExclusive
methods havepublish
attribute -
subscribe*
excludedsubscribeExclusive
methods havesubscribe
attribute
Router chooses pins in two stages. At first select all pins matched by attributes than check passed message (batch) by pin's filters and then send the whole message or its part via pins leaved after two steps.
Router chooses pins only by attributes. Pin's filters are used when message has been delivered and parsed. Registered lister doesn't receive message, or it parts failure check by pin's filter.
Some methods have All
suffix, it means that developer can publish or subscribe message via 1 or several pins otherwise via only 1 pin.
If number of passed check pins are different then required range, method throw an exception.
Developer can register only one listener for each pin but one listener can handle messages from several pins.
TransportGroupBatchRouter
router doesn't split incoming or outgoing batch by filter not unlike RabbitMessageGroupBatchRouter
router
It can be performed by the following utility methods in CommonMetrics class
setLiveness
- sets "liveness" metric of a service (exported asth2_liveness
gauge)setReadiness
- sets "readiness" metric of a service (exported as th2_readiness gauge)
NOTES:
- in order for the metrics to be exported, you will also need to create an instance of CommonFactory
- common JVM metrics will also be exported alongside common service metrics
- some metric labels are
enumerations (
th2_type
:MESSAGE_GROUP
,EVENT
,<customTag>
;message_type
:RAW_MESSAGE
,MESSAGE
)
COMMON METRICS:
- th2_component (
name
): information about the current component
RABBITMQ METRICS:
- th2_rabbitmq_message_size_publish_bytes (
th2_pin
,th2_type
,exchange
,routing_key
): number of published message bytes to RabbitMQ. The intended is intended for any data transferred via RabbitMQ, for example, th2 batch message or event or custom content - th2_rabbitmq_message_publish_total (
th2_pin
,th2_type
,exchange
,routing_key
): quantity of published messages to RabbitMQ. The intended is intended for any data transferred via RabbitMQ, for example, th2 batch message or event or custom content - th2_rabbitmq_message_size_subscribe_bytes (
th2_pin
,th2_type
,queue
): number of bytes received from RabbitMQ, it includes bytes of messages dropped after filters. For information about the number of dropped messages, please refer to 'th2_message_dropped_subscribe_total' and 'th2_message_group_dropped_subscribe_total'. The message is intended for any data transferred via RabbitMQ, for example, th2 batch message or event or custom content - th2_rabbitmq_message_process_duration_seconds (
th2_pin
,th2_type
,queue
): time of message processing during subscription from RabbitMQ in seconds. The message is intended for any data transferred via RabbitMQ, for example, th2 batch message or event or custom content
GRPC METRICS:
- th2_grpc_invoke_call_total (
th2_pin
,service_name
,service_method
): total number of calling particular gRPC method - th2_grpc_invoke_call_request_bytes (
th2_pin
,service_name
,service_method
): number of bytes sent to particular gRPC call - th2_grpc_invoke_call_response_bytes (
th2_pin
,service_name
,service_method
): number of bytes sent to particular gRPC call - th2_grpc_receive_call_total (
th2_pin
,service_name
,service_method
): total number of consuming particular gRPC method - th2_grpc_receive_call_request_bytes (
th2_pin
,service_name
,service_method
): number of bytes received from particular gRPC call - th2_grpc_receive_call_response_bytes (
th2_pin
,service_name
,service_method
): number of bytes sent to particular gRPC call
MESSAGES METRICS:
- th2_message_publish_total (
th2_pin
,session_alias
,direction
,message_type
): quantity of published raw or parsed messages - th2_message_subscribe_total (
th2_pin
,session_alias
,direction
,message_type
): quantity of received raw or parsed messages, includes dropped after filters. For information about the number of dropped messages, please refer to 'th2_message_dropped_subscribe_total' - th2_message_dropped_publish_total (
th2_pin
,session_alias
,direction
,message_type
): quantity of published raw or parsed messages dropped after filters - th2_message_dropped_subscribe_total (
th2_pin
,session_alias
,direction
,message_type
): quantity of received raw or parsed messages dropped after filters - th2_message_group_publish_total (
th2_pin
,session_alias
,direction
): quantity of published message groups - th2_message_group_subscribe_total (
th2_pin
,session_alias
,direction
): quantity of received message groups, includes dropped after filters. For information about the number of dropped messages, please refer to ' th2_message_group_dropped_subscribe_total' - th2_message_group_dropped_publish_total (
th2_pin
,session_alias
,direction
): quantity of published message groups dropped after filters - th2_message_group_dropped_subscribe_total (
th2_pin
,session_alias
,direction
): quantity of received message groups dropped after filters - th2_message_group_sequence_publish (
th2_pin
,session_alias
,direction
): last published sequence - th2_message_group_sequence_subscribe (
th2_pin
,session_alias
,direction
): last received sequence
EVENTS METRICS:
- th2_event_publish_total (
th2_pin
): quantity of published events - th2_event_subscribe_total (
th2_pin
): quantity of received events
To be able to use test extensions please fill build.gradle as in the example below:
plugins {
id 'java-test-fixtures'
}
dependencies {
testImplementation testFixtures("com.exactpro.th2:common:3.39.0")
}
- Separate connections for publisher and consumer (allows to consume while publishing is blocked by RabbitMQ)
- Updated cradle
5.4.1-dev
- Updated kubernetes-client:
6.13.1
- Provided ability to set either of raw body of several body data to
Event
builder - Updated th2 gradle plugin
0.0.8
- Added functionality for publisher confirmations to mitigate network issues for message producers.
- New parameters are added to connection manager configuration:
- enablePublisherConfirmation - enables publisher confirmation.
false
by default. - maxInflightPublicationsBytes - the max number of unconfirmed published messages per channel.
52428800
(50 MB), by default. - heartbeatIntervalSeconds - rabbitmq connection heartbeat interval in seconds.
0
by default (that means the default interval will be set by the internal library used to communicate with RabbitMQ).
- enablePublisherConfirmation - enables publisher confirmation.
- Updated kubernetes-client:
6.12.1
- Add
remove
andclear
operations toMapBuilder
- Pass information about
book
andsession group
from batch down toMessageID
in raw and parsed transport messages
- Migrated to the th2 gradle plugin:
0.0.6
(bom:4.6.1
) - Updated:
- grpc-common:
4.5.0-dev
- grpc-service-generator:
3.6.1
- cradle:
5.3.0-dev
- grpc-common:
- Use box name from
box.json
config as RabbitMQ connection name - Rise
th2_component
metric with box name asname
label value - Fixed UUID generation for each event id
- Update bom: 4.5.0 -> 4.6.0
- Update grpc-service-generator: 3.5.1 -> 3.6.0
- cradle:
5.1.5-dev
(fixed: NullPointerException on AbstractMessageIteratorProvider creation for book with no pages in it)
- Added retry in case of a RabbitMQ channel or connection error (when possible).
- Added InterruptedException to basicConsume method signature.
- Added additional logging for RabbitMQ errors.
- Fixed connection recovery delay time.
- Integration tests for RabbitMQ retry scenarios.
- Added
NOT_WILDCARD
filter operation, which filter a field which isn't matched by wildcard expression.
- Event builder checks is the book name from attached message match to the event book name
- grpc-service-generator:
3.5.1
- gRPC
retryConfiguration
has been moved from grpc.json to grpc_router.json - the whole default gRPC retry interval is about 1 minute
- grpc-service-generator:
3.5.0
- New methods for transport message builders which allows checking whether the field is set or not
- Serialization support for date time types (e.g. Instant, LocalDateTime/Date/Time) to event body serialization
- Provided the ability to define configs directory using the
th2.common.configuration-directory
environment variable
- The serialization of
LocalTime
,LocalDate
andLocalDateTime
instances corrected for th2 transport parsed message. Old result would look like[2023,9,7]
. Corrected serialization result looks like2023-09-07
SubscriberMonitor
is returned fromMessageRouter.subscribe
methods is proxy object to manage RabbitMQ subscription without internal listener
- bom:
4.4.0-dev
to4.5.0-dev
- kotlin:
1.8.22
- kubernetes-client:
6.1.1
to6.8.0
- okhttp:
4.10.0
to4.11.0
- okio:
3.0.0
to3.5.0
- okhttp:
- Pin filters behaviour changed: conditions inside the message and metadata now combined as "and"
- Added
protocol
field name for MQ pin filter - Added
hashCode
,equals
,toString
,toBuilder
for th2 transport classes - Added
get
method for th2 transportMapBuilder
,CollectionBuilder
classes
- Auto-print git metadata from
git.properties
resource file. Child project should includecom.gorylenko.gradle-git-properties
Gradle plugin to generate required file
- Migrated from JsonProcessingException to IOException in Event class methods.
This change allow remove required
jackson.core
dependency from child projects
- Implemented message routers used th2 transport protocol for interaction
- cradle:
5.1.1-dev
- bom:
4.4.0
- grpc-common:
4.3.0-dev
- grpc-service-generator:
3.4.0
- Updated org.owasp.dependencycheck:
8.3.1
- Added com.gorylenko.gradle-git-properties
2.4.1
- Added com.github.jk1.dependency-license-report
2.5
- Added de.undercouch.download
5.4.0
- Book, session group and protocol message filtering added.
- The Cradle version is update to 5.0.2-dev-*.
- Merged with 3.44.1
- Added script for publishing dev-release for maven artefacts
- Migrated to bom:4.2.0
- Migrated to grpc-common:4.1.1-dev
- Migrated to grpc-common 4.1.0
- Migration to books/pages cradle 4.0.0
- Migration to bom 4.0.2
- Removed log4j 1.x from dependency
- Removed
cradleInstanceName
parameter fromcradle.json
- Added
prepareStorage
property tocradle.json
com.exactpro.th2.common.event.Event.toProto...()
byparentEventId
/bookName
/(bookName + scope)
- Added
isRedelivered
flag to message
- Remove unused dependency
- Updated bom:4.2.0
- There is no support for log4j version 1.
- Work was done to eliminate vulnerabilities in common and bom dependencies.
- th2-bom must be updated to 4.0.3 or higher.
- Added the
enableSizeMeasuring
,maxMessageSize
,keepAliveInterval
options into gRPC router configuration. Default values are false, 4194304, 60
- log4j and slf4j versions update
- th2-bom must be updated to 4.0.2 or higher.
- Work was done to eliminate vulnerabilities in common and bom dependencies.
- th2-bom must be updated to 4.0.1 or higher.
- gRPC router creates server support grpc-service-reflection
- Fixed:
- The message is not confirmed when the delivery has incorrect format
- Fixed:
- The message is not confirmed when it was filtered
- Fixed:
- cradle version updated to 3.1.2. Unicode character sizes are calculated properly during serialization and tests are added for it also.
- gRPC metrics added
- Migration to log4j2. th2-bom must be updated to 3.2.0 or higher
- There is backward compatibility with the log4j format.
- If both configurations are available, log4j2 is preferable.
- Corrected logging for configuration files
- Fixed:
- When creating the
CommonFactory
from k8s the logging configuration wouldn't be downloaded
- When creating the
- Added support for gRPC pins filters
- Cradle version was updated from
2.20.2
to3.1.1
. Please, note, that migration is required for3.1.1
usage. - New parameter
prepareStorage
is added to thecradle_manager.json
. It allows enabling/disabling Cradle schema initialization.
- Included dependency to the io.prometheus:simpleclient_log4j:0.9.0
- Added the ability to read dictionaries by aliases and as group of all available aliases
- New methods for api: loadDictionary(String), getDictionaryAliases(), loadSingleDictionary()
- Methods for subscription with manual acknowledgement (if the prefetch count is requested and no messages are acknowledged the reading from the queue will be suspended). Please, note that only one subscriber with manual acknowledgement can be subscribed to a queue
- Fixed: gRPC router didn't shut down underlying Netty's EventLoopGroup and ExecutorService
- Added new test utils for assertion of AnyMessage or Groups of messages
- Update Cradle version from 2.20.0 to 2.20.2
- Ignore unknown fields in
box.json
andprometheus.json
- Add support for
null_value
filter during conversion to table
- Update grpc-common from 3.8.0 to 3.9.0
- Feature as test assertion methods for messages from fixtures
- Fix printing of empty MessageGroupBatch in debug logs of MessageGroupBatch router
- Print message ids of MessageGroupBatch in debug logs of MessageGroupBatch router
- Added util methods from store-common to use in estore/mstore
- Do not publish messages if the whole batch was filtered
- Fix the problem with filtering by
message_type
in MessageGroupBatch router
- Update Cradle version from
2.13.0
to2.20.0
- Added new parameter
hint
forVerificationEntry
- Added new abstract router
AbstractRabbitRouter
, removedMessageQueue
hierarchy - Parsed/raw routers work with
MessageGroupBatch
router - Added new metrics and removed old
- Migrated
grpc-common
version from3.7.0
to3.8.0
- Added
time_precision
anddecimal_precision
parameters toRootComparisonSettings
- Added
- Migrated
grpc-common
version from3.6.0
to3.7.0
- Added
check_repeating_group_order
parameter toRootComparisonSettings
message
- Added
- Migrated
grpc-common
version from3.5.0
to3.6.0
- Added
description
parameter toRootMessageFilter
message
- Added
- Fix
SimpleFilter
andValueFilter
treeTable convertation
- Add
SimpleList
display toTreeTableEntry
;
- Update the grpc-common version to 3.5.0
- Added
SimpleList
toSimpleFilter
- Added
- Added support for converting
SimpleList
to readable payload body
- Extension method for
MessageRouter<EventBatch>
now send the event to all pins that satisfy the requested attributes set
- Added util to convert RootMessageFilter into readable collection of payload bodies
- Fixed
messageRecursionLimit
- still was not applied to all kind of RabbitMQ subscribers
- Fixed
messageRecursionLimit
setting for all kind of RabbitMQ subscribers
- Added setting
messageRecursionLimit
(the default value is set to 100) to RabbitMQ configuration that denotes how deep nested protobuf messages might be.
- Update the grpc-common version to 3.4.0
- Added
IN
,LIKE
,MORE
,LESS
,WILDCARD
FilterOperation and their negative versions
- Added
- Change class for filtering in router from
FilterOperation
toFieldFilterOperation
- Added
WILDCARD
filter operation, which filter a field by wildcard expression.
- Fixed grpc server start.
- Update the grpc-common version to 3.3.0:
- Added information about message timestamp into the checkpoint
- Added classes for management metrics.
- Added the ability for resubscribe on canceled subscriber.
- Extended filter's format
- Add multiply filters support
- Added the Event.toListBatchProto method to covert an instance of the Event class to list of event batches.
- Fix possible NPE when adding the
Exception
to the event withnull
message - Correct exception messages
- The
toMetadataFilter
returnsnull
if the original metadata has nothing to compare - The
toRootMessageFilter
does not add theMetadataFilter
if the message's metadata has nothing to compare
- Update Cradle version from
2.9.1
to2.13.0
- Extended message utility class
- Added the toRootMessageFilter method to convert a message to root message filter
- Update
th2-grpc-common
andth2-grpc-service-generator
versions to3.2.0
and3.1.12
respectively
- Disable waiting for connection recovery when closing the
SubscribeMonitor
- Change the way that channels are stored (they are mapped to the pin instead of to the thread). It might increase the average number of channels used by the box, but it also limits the max number of channels to the number of pins
- Restore backward compatibility for MessageConverter factory methods.
NOTE: one of the methods was not restored and an update to this version might require manual update for your code.
The old methods without
toTraceString
supplier will be removed in the future - Fixed configuration for gRPC server.
- Added the property
workers
, which changes the count of gRPC server's threads
- Added the property
- Extended Utility classes
- Added the toTreeTable method to convert message/message filter to event data
- Added the Event.exception method to include an exception and optionally all the causes to the body data as a series of messages
- add
session alias
anddirection
labels to incoming metrics - rework logging for incoming and outgoing messages
- add
toProtoEvent(EventID)
andtoProtoEvents(EventID)
overloads into the Event class
- resets embedded
log4j
configuration before configuring it from a file
- fixed a bug with message filtering by
message_type
- migration to Sonatype
- additional fixes for dictionary reading
- add backward compatibility for reading dictionaries
- removed gRPC event loop handling
- fixed dictionary reading
- reads dictionaries from the /var/th2/config/dictionary folder.
- uses mq_router, grpc_router, cradle_manager optional JSON configs from the
/var/th2/config
folder
- tries to load log4j.properties files from sources in order: '/var/th2/config', '/home/etc', configured path via cmd, default configuration
- update Cradle version. Introduce async API for storing events
- metrics related to time measurement of an incoming message handling (Raw / Parsed / Event) migrated to Prometheus histogram