Skip to content

Commit

Permalink
Remove hyphen between dead and letter
Browse files Browse the repository at this point in the history
Remove hyphen between dead and letter in the documentation and logs
statements, as it's incorrect.

#2021
  • Loading branch information
smcvb committed Sep 7, 2022
1 parent b94ca3d commit cd95e26
Show file tree
Hide file tree
Showing 19 changed files with 160 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ default Optional<SequencedDeadLetterQueue<EventMessage<?>>> deadLetterQueue(
}

/**
* Returns the {@link EnqueuePolicy dead-letter policy} tied to the given {@code processingGroup} in an
* Returns the {@link EnqueuePolicy dead letter policy} tied to the given {@code processingGroup} in an
* {@link Optional}. May return an {@link Optional} containing the
* {@link EventProcessingConfigurer#registerDefaultDeadLetterPolicy(Function) default policy} if present.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,15 +689,15 @@ default EventProcessingConfigurer registerDeadLetterQueue(
}

/**
* Register a default {@link EnqueuePolicy dead-letter policy} for any processing group using a
* {@link #registerDeadLetterQueue(String, Function) dead-letter queue}. The processing group uses the policy to
* Register a default {@link EnqueuePolicy dead letter policy} for any processing group using a
* {@link #registerDeadLetterQueue(String, Function) dead letter queue}. The processing group uses the policy to
* deduce whether a failed {@link EventMessage} should be
* {@link SequencedDeadLetterQueue#enqueue(Object, DeadLetter) enqueued} for later evaluation.
* <p>
* Note that the configured component will not be used if the processing group <em>does not</em> have a dead-letter
* Note that the configured component will not be used if the processing group <em>does not</em> have a dead letter
* queue.
*
* @param policyBuilder A builder method to construct a default {@link EnqueuePolicy dead-letter policy}.
* @param policyBuilder A builder method to construct a default {@link EnqueuePolicy dead letter policy}.
* @return The current {@link EventProcessingConfigurer} instance, for fluent interfacing.
*/
default EventProcessingConfigurer registerDefaultDeadLetterPolicy(
Expand All @@ -707,16 +707,16 @@ default EventProcessingConfigurer registerDefaultDeadLetterPolicy(
}

/**
* Register a {@link EnqueuePolicy dead-letter policy} for the given {@code processingGroup} using a
* {@link #registerDeadLetterQueue(String, Function) dead-letter queue}. The processing group uses the policy to
* Register a {@link EnqueuePolicy dead letter policy} for the given {@code processingGroup} using a
* {@link #registerDeadLetterQueue(String, Function) dead letter queue}. The processing group uses the policy to
* deduce whether a failed {@link EventMessage} should be
* {@link SequencedDeadLetterQueue#enqueue(Object, DeadLetter) enqueued} for later evaluation.
* <p>
* Note that the configured component will not be used if the processing group <em>does not</em> have a dead-letter
* Note that the configured component will not be used if the processing group <em>does not</em> have a dead letter
* queue.
*
* @param processingGroup The name of the processing group to build an {@link EnqueuePolicy} for.
* @param policyBuilder A builder method to construct a {@link EnqueuePolicy dead-letter policy} for the given
* @param policyBuilder A builder method to construct a {@link EnqueuePolicy dead letter policy} for the given
* {@code processingGroup}.
* @return The current {@link EventProcessingConfigurer} instance, for fluent interfacing.
*/
Expand All @@ -733,7 +733,7 @@ default EventProcessingConfigurer registerDeadLetterPolicy(
* {@link DeadLetteringEventHandlerInvoker dead lettering processing group} through its
* {@link DeadLetteringEventHandlerInvoker.Builder builder}.
* <p>
* Note that the configured component will not be used if the processing group <em>does not</em> have a dead-letter
* Note that the configured component will not be used if the processing group <em>does not</em> have a dead letter
* queue.
*
* @param processingGroup The name of the processing group to attach additional configuration too.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import java.util.function.Function;

/**
* A {@link Function} dedicated to processing a single {@link DeadLetter dead-letter} of an {@link EventMessage}. Used
* by the {@link DeadLetteringEventHandlerInvoker} to ensure the dead-letter is passed to the same set of
* A {@link Function} dedicated to processing a single {@link DeadLetter dead letter} of an {@link EventMessage}. Used
* by the {@link DeadLetteringEventHandlerInvoker} to ensure the dead letter is passed to the same set of
* {@link EventMessageHandler event handling components}.
*
* @author Steven van Beelen
Expand Down Expand Up @@ -73,12 +73,12 @@ public EnqueueDecision<EventMessage<?>> apply(DeadLetter<EventMessage<?>> letter
* {@code letter} on successful handling. On unsuccessful event handling the configured {@link EnqueuePolicy} is
* used to decide what to do with the {@code letter}.
*
* @param letter The {@link DeadLetter dead-letter} to process.
* @param letter The {@link DeadLetter dead letter} to process.
* @return An {@link EnqueueDecision} describing what to do after processing the given {@code letter}.
*/
public EnqueueDecision<EventMessage<?>> process(DeadLetter<? extends EventMessage<?>> letter) {
if (logger.isDebugEnabled()) {
logger.debug("Start evaluation of dead-letter [{}].", letter);
logger.debug("Start evaluation of dead letter [{}].", letter);
}

AtomicReference<EnqueueDecision<EventMessage<?>>> decision = new AtomicReference<>();
Expand All @@ -103,14 +103,14 @@ private Object handle(DeadLetter<? extends EventMessage<?>> letter) throws Excep

private EnqueueDecision<EventMessage<?>> onCommit(DeadLetter<? extends EventMessage<?>> letter) {
if (logger.isInfoEnabled()) {
logger.info("Processing dead-letter [{}] was successful.", letter);
logger.info("Processing dead letter [{}] was successful.", letter);
}
return Decisions.evict();
}

private EnqueueDecision<EventMessage<?>> onRollback(DeadLetter<? extends EventMessage<?>> letter, Throwable cause) {
if (logger.isWarnEnabled()) {
logger.warn("Processing dead-letter [{}] failed.", letter, cause);
logger.warn("Processing dead letter [{}] failed.", letter, cause);
}
return enqueuePolicy.decide(letter, cause);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
* event ordering is maintained in face of failures.
* <p>
* This dead lettering invoker provides several operations to {@link #processAny() process}
* {@link DeadLetter dead-letters} it has enqueued. It will ensure the same set of Event Handling Components is invoked
* as with regular event handling when processing a dead-letter. These methods will try to process an entire sequence of
* dead-letters. Furthermore, these are exposed through the {@link SequencedDeadLetterProcessor} contract.
* {@link DeadLetter dead letters} it has enqueued. It will ensure the same set of Event Handling Components is invoked
* as with regular event handling when processing a dead letter. These methods will try to process an entire sequence of
* dead letters. Furthermore, these are exposed through the {@link SequencedDeadLetterProcessor} contract.
*
* @author Steven van Beelen
* @since 4.6.0
Expand All @@ -74,7 +74,7 @@ public class DeadLetteringEventHandlerInvoker

/**
* Instantiate a dead-lettering {@link EventHandlerInvoker} based on the given {@link Builder builder}. Uses a
* {@link SequencedDeadLetterQueue} to maintain and retrieve dead-letters from.
* {@link SequencedDeadLetterQueue} to maintain and retrieve dead letters from.
*
* @param builder The {@link Builder} used to instantiate a {@link DeadLetteringEventHandlerInvoker} instance.
*/
Expand Down Expand Up @@ -128,7 +128,7 @@ public void handle(@Nonnull EventMessage<?> message, @Nonnull Segment segment) t
if (decision.shouldEnqueue()) {
queue.enqueue(sequenceIdentifier, decision.withDiagnostics(letter));
} else if (logger.isInfoEnabled()) {
logger.info("The enqueue policy decided not to dead-letter event [{}].", message.getIdentifier());
logger.info("The enqueue policy decided not to dead letter event [{}].", message.getIdentifier());
}
}
}
Expand Down Expand Up @@ -178,14 +178,14 @@ public static class Builder extends SimpleEventHandlerInvoker.Builder<Builder> {

private Builder() {
// The parent's error handler defaults to propagating the error.
// Otherwise, faulty events would not be dead-lettered.
// Otherwise, faulty events would not be dead lettered.
super.listenerInvocationErrorHandler(PropagatingErrorHandler.instance());
}

/**
* Sets the {@link SequencedDeadLetterQueue} this {@link EventHandlerInvoker} maintains dead-letters with.
* Sets the {@link SequencedDeadLetterQueue} this {@link EventHandlerInvoker} maintains dead letters with.
*
* @param queue The {@link SequencedDeadLetterQueue} this {@link EventHandlerInvoker} maintains dead-letters
* @param queue The {@link SequencedDeadLetterQueue} this {@link EventHandlerInvoker} maintains dead letters
* with.
* @return The current Builder instance for fluent interfacing.
*/
Expand All @@ -197,11 +197,11 @@ public Builder queue(@Nonnull SequencedDeadLetterQueue<EventMessage<?>> queue) {

/**
* Sets the {@link EnqueuePolicy} this {@link EventHandlerInvoker} uses to decide whether a
* {@link DeadLetter dead-letter} should be added to the {@link SequencedDeadLetterQueue}. Defaults to returning
* {@link Decisions#enqueue(Throwable)} when invoked for any dead-letter.
* {@link DeadLetter dead letter} should be added to the {@link SequencedDeadLetterQueue}. Defaults to returning
* {@link Decisions#enqueue(Throwable)} when invoked for any dead letter.
*
* @param enqueuePolicy The {@link EnqueuePolicy} this {@link EventHandlerInvoker} uses to decide whether a
* {@link DeadLetter dead-letter} should be added to the {@link SequencedDeadLetterQueue}.
* {@link DeadLetter dead letter} should be added to the {@link SequencedDeadLetterQueue}.
* @return The current Builder, for fluent interfacing.
*/
public Builder enqueuePolicy(EnqueuePolicy<EventMessage<?>> enqueuePolicy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.axonframework.messaging.deadletter;

/**
* Contract describing the cause for {@link DeadLetter dead-lettering} a {@link org.axonframework.messaging.Message}.
* Contract describing the cause for {@link DeadLetter dead lettering} a {@link org.axonframework.messaging.Message}.
* These objects typically reflects a {@link Throwable}.
*
* @author Steven van Beelen
Expand All @@ -27,18 +27,18 @@
public interface Cause {

/**
* Returns the type of dead-lettering cause. The {@code type} can, for example, reflect the fully qualified class
* Returns the type of dead lettering cause. The {@code type} can, for example, reflect the fully qualified class
* name of a {@link Throwable}.
*
* @return The type of this dead-lettering cause.
* @return The type of this dead lettering cause.
*/
String type();

/**
* A message describing a cause for dead-lettering. The {@code message()} can, for example, reflect the message of a
* A message describing a cause for dead lettering. The {@code message()} can, for example, reflect the message of a
* {@link Throwable}.
*
* @return The message describing this cause's reason for dead-lettering.
* @return The message describing this cause's reason for dead lettering.
*/
String message();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.function.UnaryOperator;

/**
* Interface describing a dead-lettered {@link Message} implementation of generic type {@code M}.
* Interface describing a dead lettered {@link Message} implementation of generic type {@code M}.
* <p>
* The time of storing the {@link #message()} is kept through {@link #enqueuedAt()}. The last time this letter was
* accessed on either {@link SequencedDeadLetterQueue#requeue(DeadLetter, UnaryOperator)} or
Expand All @@ -47,18 +47,18 @@ public interface DeadLetter<M extends Message<?>> {
M message();

/**
* The {@link Cause cause} for the {@link #message()} to be dead-lettered. Can be an {@link Optional#empty()} in
* The {@link Cause cause} for the {@link #message()} to be dead lettered. Can be an {@link Optional#empty()} in
* case this letter is enqueued without a causal error. For instance, when another letter already present in the
* queue was blocking it being handled.
*
* @return The {@link Cause cause} for the {@link #message()} to be dead-lettered.
* @return The {@link Cause cause} for the {@link #message()} to be dead lettered.
*/
Optional<Cause> cause();

/**
* The moment in time when the {@link #message()} was entered in a dead-letter queue.
* The moment in time when the {@link #message()} was entered in a dead letter queue.
*
* @return The moment in time when the {@link #message()} was entered in a dead-letter queue.
* @return The moment in time when the {@link #message()} was entered in a dead letter queue.
*/
Instant enqueuedAt();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public DeadLetterQueueOverflowException(String message) {
*/
public DeadLetterQueueOverflowException(Object identifier) {
super("Unable to enqueue letter in sequence [" + identifier + "]. "
+ "The maximum capacity of dead-letters has been reached.");
+ "The maximum capacity of dead letters has been reached.");
}
}

0 comments on commit cd95e26

Please sign in to comment.