30 June 2023
FIXEdge Java 1.10.3 release: Domain Specific Language to define business rules
B2BITS, EPAM Systems company, is pleased to
share the release of version 1.10.3 of FIXEdge Java .
New features and improvements:
Groovy DSL (Domain Specific Language) allows
non-programmers to intuitively author and maintain business rules
for FIXEdge Java in a much simpler way compared to programming in
pure Groovy or Java.
Groovy DSL covers most use cases in FIX
protocol-defined workflows:
routing to endpoints ,
FIX message transformation , and
handling of important session management events . It supports
both a declarative style of writing rules for unconditional routing
"from <endpoint A> to <endpoint B>" and an imperative
style where DSL conditional logic and executable actions are
expressed explicitly for a given session and selected set of
fields. The DSL message rules are defined by the description and
bound for the processing of
incoming messages from a particular session or group of
sessions .
The DSL-defined business rules are stored in
a way similar to the
rules expressed in Groovy or Java . The rules.groovy
configuration file allows mixing and matching DSL with pure Groovy
and Java code for backward compatibility and complex cases with
message enrichment. The processing of DSL-expressed rules is as
efficient as Groovy and Java written rules.
Pure Groovy Rule
Groovy DSL Rule
// Unconditional Routing Rule
messageRule("From session3 to session4")
.sourceCondition(
{
source -> source.id == "session3" })
.action(
{
ctx ->
try {
routingContext.getDestinationById("session4").send(ctx.messageEvent)
} catch (all) {
logger.error(all.getMessage(), all)
}
})
.build(),
// Unconditional Routing Rule
rulesDSL(routingContext as RoutingContext)
{
routing {
from "session3" to "session4"
}
}
// Routing Message Rule
messageRule("Routing Rule sample")
.sourceCondition(
{
source -> source.id == "session2" })
.condition(
{
ctx -> ctx.getMessage().getTagValueAsString(35) == "D" })
.action(
{
ctx ->
logger.info("Send
message to: session1")
try
{
routingContext.getDestinationById("session1").send(ctx.messageEvent)
ctx.exit()
}
catch (all) {
logger.error(all.getMessage(), all)
}
})
.build(),
// Routing Message Rule
rulesDSL(routingContext as RoutingContext)
{
messageRules {
messageRule("From session2 all msg with type D route to session1")
{
source {
id "session2"
}
condition {
msgType "D"
}
action {
sendTo "session1"
context exit
}
}
}
}
// Event Rule
eventRule("FIX Session Connect")
.eventType(FIXSessionStateEvent.class)
.condition({
event ->
return event.sessionId == "session1" &&
isConnected(event.sessionState as SessionState)
})
.action({
event ->
logger.info("[FIX
Session Connect] Session is connected: session1")
})
.build()
//Event Rule
rulesDSL(routingContext as RoutingContext)
{
eventRules {
FixSessionStateEventRule("FIX Session Connect") {
condition {
session "session1"
sessionState connected
}
action {
log "[FIX Session Connect]
Session is connected: session1"
}
}
}
}
Responding to multiple clients'
requests to provide access to new exchanges via WebSocket protocol
we extended set of transport adapters.
The WebSockets TA is configured as yet
another TA following
FIX community recommendations .
The 'FIXLatest' application version
of FIX protocol
The complete
Release Notes are available in the
Products Knowledge Base .
For our existing customers, the new versions
of FIXEdge Java are available for download in the B2BITS client space . For other interested
parties, an evaluation of FIXEdge Java is available upon request.
Please direct requests for evaluation to sales@btobits.com .
Previous news | Next