Class ConsumerConfiguration
java.lang.Object
io.fluxzero.sdk.tracking.ConsumerConfiguration
- All Implemented Interfaces:
Substitutable<ConsumerConfiguration>
Configuration class that defines how a message consumer behaves during message tracking and handler invocation.
ConsumerConfiguration is used to fine-tune the behavior of message consumers beyond what is possible with the
Consumer annotation. It supports handler filtering, tracking concurrency, custom interceptors, and more.
Usage: Consumers can be declared programmatically using this configuration object, generated
automatically from @Consumer annotations on handler classes or packages, or derived from the default
consumer template for handlers without an explicit consumer.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAssigns unconfigured handlers to the shared default application consumer for their message type.static final longDefault serialized payload byte limit per tracking fetch.static final StringConfigures the default serialized payload byte limit per tracking fetch.static final StringCreates an isolated default consumer per unconfigured handler class.static final StringChooses how unconfigured tracking handlers are assigned to default consumers.static final longSentinel value for consumers that inherit the configured default max fetch byte limit. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Stream<ConsumerConfiguration> configurations(Collection<Class<?>> handlerClasses) Returns a stream ofConsumerConfigurations by inspecting the given handler classes and their packages.intexclusivityPriority(Long index) ordered()Returns a copy with consumer-specific interceptors ordered byOrder.Replaces placeholders in the properties of the current resource with resolved values from application properties and returns a new instance of typeT.
-
Field Details
-
UNCONFIGURED_HANDLER_CONSUMER_MODE_PROPERTY
Chooses how unconfigured tracking handlers are assigned to default consumers.Supported values are
PER_HANDLER_CONSUMER_MODEandDEFAULT_APP_CONSUMER_MODE. When absent, Fluxzero derives the default fromApplicationProperties.DEFAULTS_VERSION_PROPERTY.- See Also:
-
PER_HANDLER_CONSUMER_MODE
Creates an isolated default consumer per unconfigured handler class.- See Also:
-
DEFAULT_APP_CONSUMER_MODE
Assigns unconfigured handlers to the shared default application consumer for their message type.- See Also:
-
MAX_FETCH_BYTES_PROPERTY
Configures the default serialized payload byte limit per tracking fetch. Consumers can override this default withorinvalid reference
Builder#maxFetchBytes(long)Consumer.maxFetchBytes().- See Also:
-
DEFAULT_MAX_FETCH_BYTES
public static final long DEFAULT_MAX_FETCH_BYTESDefault serialized payload byte limit per tracking fetch.- See Also:
-
USE_DEFAULT_MAX_FETCH_BYTES
public static final long USE_DEFAULT_MAX_FETCH_BYTESSentinel value for consumers that inherit the configured default max fetch byte limit. This value is resolved before read requests are sent.- See Also:
-
-
Constructor Details
-
ConsumerConfiguration
public ConsumerConfiguration()
-
-
Method Details
-
substituteProperties
Description copied from interface:SubstitutableReplaces placeholders in the properties of the current resource with resolved values from application properties and returns a new instance of typeT.- Specified by:
substitutePropertiesin interfaceSubstitutable<ConsumerConfiguration>- Returns:
- a new instance of the resource with substituted properties.
-
ordered
Returns a copy with consumer-specific interceptors ordered byOrder. -
conditionallyExclusive
public boolean conditionallyExclusive() -
exclusivityPriority
-
configurations
Returns a stream ofConsumerConfigurations by inspecting the given handler classes and their packages. Includes both class-level and package-level@Consumerannotations.
-