Enum Class OversizedSseStrategy
- All Implemented Interfaces:
Serializable
,Comparable<OversizedSseStrategy>
,Constable
Strategy for handling oversized SSE messages that exceed the configured max-line-size.
- Since:
- 1.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSend the oversized message to dead letters, continuing with stream processing.Fail the stream with an IllegalStateException when an oversized message is encountered.Log a warning and skip the oversized message, continuing with stream processing.Log an info message and truncate the oversized message to the configured max-line-size, continuing with stream processing. -
Method Summary
Modifier and TypeMethodDescriptionasScala()
Convert this Java enum to the corresponding Scala enum value.static OversizedSseStrategy
fromScala
(OversizedSseStrategy scalaStrategy) Convert from a Scala enum value to the corresponding Java enum value.static OversizedSseStrategy
Returns the enum constant of this class with the specified name.static OversizedSseStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FailStream
Fail the stream with an IllegalStateException when an oversized message is encountered. This is the default behavior to maintain backward compatibility. -
LogAndSkip
Log a warning and skip the oversized message, continuing with stream processing. -
Truncate
Log an info message and truncate the oversized message to the configured max-line-size, continuing with stream processing. -
DeadLetter
Send the oversized message to dead letters, continuing with stream processing.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
asScala
Convert this Java enum to the corresponding Scala enum value. -
fromScala
Convert from a Scala enum value to the corresponding Java enum value.
-