EX221 Red Hat Certified Specialist In Cloud-Native Integration Practice Questions
Prepare for EX221 with more than an answer.
- 1
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. - 2
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: B
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. - 3
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: C
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
- 4
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: B
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. - 5
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. - 6
You are implementing a fault tolerance strategy for a REST client in a Quarkus application. You want to ensure that if the external service fails, the application retries the request up to 3 times with a 200ms delay between attempts. Which annotation usage is correct?
Show answer details
Correct answer: A
The
@Retryannotation from MicroProfile Fault Tolerance is used to configure retry logic.maxRetriessets the maximum number of retries, anddelaysets the wait time between retries in milliseconds.
