public class EventMessageDeadLetterJpaConverter extends Object implements DeadLetterJpaConverter<EventMessage<?>>
EventMessage
implementations that should be supported
by a SequencedDeadLetterQueue
capable of storing
EventMessages
.
It rebuilds the original message implementation by checking which properties were extracted when it was originally
mapped. For example, if the aggregate type and token are present, it will construct a
GenericTrackedDomainEventMessage
.
Constructor and Description |
---|
EventMessageDeadLetterJpaConverter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(DeadLetterEventEntry message)
Check whether this converter supports the given
DeadLetterEventEntry . |
boolean |
canConvert(EventMessage<?> message)
Check whether this converter supports the given
EventMessage . |
EventMessage<?> |
convert(DeadLetterEventEntry entry,
Serializer eventSerializer,
Serializer genericSerializer)
Converts a
DeadLetterEventEntry to a EventMessage implementation. |
DeadLetterEventEntry |
convert(EventMessage<?> message,
Serializer eventSerializer,
Serializer genericSerializer)
Converts an
EventMessage implementation to a DeadLetterEventEntry . |
public DeadLetterEventEntry convert(EventMessage<?> message, Serializer eventSerializer, Serializer genericSerializer)
DeadLetterJpaConverter
EventMessage
implementation to a DeadLetterEventEntry
.convert
in interface DeadLetterJpaConverter<EventMessage<?>>
message
- The message to convert.eventSerializer
- The Serializer
for serialization of payload and metadata.genericSerializer
- The Serializer
for serialization of the token, if present.DeadLetterEventEntry
public EventMessage<?> convert(DeadLetterEventEntry entry, Serializer eventSerializer, Serializer genericSerializer)
DeadLetterJpaConverter
DeadLetterEventEntry
to a EventMessage
implementation.convert
in interface DeadLetterJpaConverter<EventMessage<?>>
entry
- The database entry to convert to a EventMessage
eventSerializer
- The Serializer
for deserialization of payload and metadata.genericSerializer
- The Serializer
for deserialization of the token, if present.DeadLetterEventEntry
public boolean canConvert(DeadLetterEventEntry message)
DeadLetterJpaConverter
DeadLetterEventEntry
.canConvert
in interface DeadLetterJpaConverter<EventMessage<?>>
message
- The message to check support for.public boolean canConvert(EventMessage<?> message)
DeadLetterJpaConverter
EventMessage
.canConvert
in interface DeadLetterJpaConverter<EventMessage<?>>
message
- The message to check support for.Copyright © 2010–2023. All rights reserved.