EX221 Red Hat Certified Specialist In Cloud-Native Integration Practice Questions
Prepare for EX221 with more than an answer.
- 1
You are defining a Camel route that processes a large XML file containing a list of
Customerrecords. You want to split the file into individual customer records and process them in parallel to improve performance. Which DSL configuration achieves this?Show answer details
Correct answer: A
The
.split()EIP is used to break down the message. The XPath expression selects individual customer nodes. The.parallelProcessing()method enables the split messages to be processed concurrently by a thread pool, satisfying the performance requirement. - 2
When deploying a Quarkus application to OpenShift, you need to map a sensitive API key from a Kubernetes Secret to an environment variable inside the container. The secret is named 'api-creds' and the key is 'api-key'. Which configuration in
application.propertiesachieves this using thequarkus-openshiftextension?Show answer details
Correct answer: A
This configuration syntax correctly instructs the OpenShift extension to create an environment variable
API_KEYin the DeploymentConfig, sourcing its value from the 'api-key' key within the 'api-creds' secret. - 3
You are debugging a Camel route that uses the
directcomponent. You observe that the producer thread is blocked until the consumer finishes processing the message. What is the reason for this behavior?Show answer details
Correct answer: A
The
direct:component provides direct, synchronous invocation of the consumer from the producer. They share the same thread, meaning the producer will not proceed until the consumer route completes. - 4
Case Study: A logistics company is modernizing its tracking system using Quarkus and Camel. The system receives GPS coordinates via MQTT.
Scenario:
- Ingest GPS data from MQTT topic
trucks/+/position. - Transform the JSON payload to a Java POJO.
- Filter out coordinates where
speed < 5. - Send valid coordinates to a REST API
http://fleet-mgmt/api/locations. - If the REST API is down, store the data in a local file for later processing.
Which Camel route definition best implements this logic?
Show answer details
Correct answer: A
This route correctly follows the requirements: ingests from MQTT, unmarshals JSON to POJO, filters based on speed, and uses a
doTry...doCatchblock to handle the REST API failure by falling back to a file producer. - Ingest GPS data from MQTT topic
- 5
You are developing a cloud-native integration application using Red Hat Fuse on OpenShift. You need to implement a Content-Based Router pattern to direct incoming orders to different processing endpoints based on the 'orderType' header. Which Camel Java DSL syntax correctly implements this pattern?
Show answer details
Correct answer: A
The
.choice()method initiates the Content-Based Router pattern in Camel Java DSL. It is followed by one or more.when()clauses that evaluate predicates (like checking a header value), and optionally an.otherwise()clause for default routing. This structure accurately routes messages based on content. - 6
A developer is configuring a Quarkus application to act as a consumer for a Kafka topic named 'transaction-events'. The application uses the SmallRye Reactive Messaging extension. Which configuration property in 'application.properties' correctly maps the 'transactions-in' channel to the 'transaction-events' Kafka topic?
Show answer details
Correct answer: A
In SmallRye Reactive Messaging (MicroProfile Messaging), incoming channels are configured using the prefix
mp.messaging.incoming.[channel-name]. The.topicproperty specifies the actual Kafka topic name to bind to that channel.
