Class DefaultOdysseyRequestManager
java.lang.Object
io.confluent.kafka.odyssey.DefaultOdysseyRequestManager
- All Implemented Interfaces:
OdysseyRequestManager, AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a DefaultOdysseyRequestManager with default settings.DefaultOdysseyRequestManager(int maxThreads, int maxQueueSize, int requestTimeoutMs) Creates a DefaultOdysseyRequestManager with custom thread pool settings.DefaultOdysseyRequestManager(int maxThreads, int maxQueueSize, int requestTimeoutMs, Map<String, ?> configs) Creates a DefaultOdysseyRequestManager with custom settings and configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Gracefully shuts down the manager, cleaning up resources.createAssociations(List<TopicAssociationInfo> topics, boolean topicAlreadyExists, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient client) Creates associations with Odyssey.io.confluent.kafka.schemaregistry.client.SchemaRegistryClientcreateClient(String schemaRegistryUrl) Creates a SchemaRegistryClient for the given URL.validate(Map<String, ParsedAssociations> topicAssociations, String namespace, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient client)
-
Constructor Details
-
DefaultOdysseyRequestManager
public DefaultOdysseyRequestManager()Creates a DefaultOdysseyRequestManager with default settings. -
DefaultOdysseyRequestManager
public DefaultOdysseyRequestManager(int maxThreads, int maxQueueSize, int requestTimeoutMs) Creates a DefaultOdysseyRequestManager with custom thread pool settings.- Parameters:
maxThreads- maximum number of worker threadsmaxQueueSize- maximum queue size for pending requestsrequestTimeoutMs- request timeout in milliseconds
-
DefaultOdysseyRequestManager
public DefaultOdysseyRequestManager(int maxThreads, int maxQueueSize, int requestTimeoutMs, Map<String, ?> configs) Creates a DefaultOdysseyRequestManager with custom settings and configuration.- Parameters:
maxThreads- maximum number of worker threadsmaxQueueSize- maximum queue size for pending requestsrequestTimeoutMs- request timeout in millisecondsconfigs- additional configuration (e.g., authentication for SR clients)
-
-
Method Details
-
createClient
public io.confluent.kafka.schemaregistry.client.SchemaRegistryClient createClient(String schemaRegistryUrl) Description copied from interface:OdysseyRequestManagerCreates a SchemaRegistryClient for the given URL. The client should be reused for all operations within a single Odyssey request.- Specified by:
createClientin interfaceOdysseyRequestManager- Parameters:
schemaRegistryUrl- The Schema Registry endpoint URL- Returns:
- A configured SchemaRegistryClient (with cacheCapacity=0 for minimal overhead)
-
validate
public CompletableFuture<Map<String, OdysseyResult>> validate(Map<String, ParsedAssociations> topicAssociations, String namespace, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient client) - Specified by:
validatein interfaceOdysseyRequestManager
-
createAssociations
public CompletableFuture<Map<String, OdysseyResult>> createAssociations(List<TopicAssociationInfo> topics, boolean topicAlreadyExists, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient client) Description copied from interface:OdysseyRequestManagerCreates associations with Odyssey.- Specified by:
createAssociationsin interfaceOdysseyRequestManager- Parameters:
topics- List of topics with their association informationtopicAlreadyExists- If true, uses INSERT-only semantics (topic already exists)client- The SchemaRegistryClient- Returns:
- CompletableFuture with Map of topic name to result
-
close
public void close()Description copied from interface:OdysseyRequestManagerGracefully shuts down the manager, cleaning up resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceOdysseyRequestManager
-