diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f83440..55a9318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ The envelope wire format is versioned separately by `meta.schema_version` ## [Unreleased] +## [1.1.1] - 2026-10-26 + +### Changed + +- The poison DLQ block is built by `babelqueue-core` 1.14.0; no wire change. Requires `babelqueue-core` 1.14.0 (was 1.13.0). + ## [1.1.0] - 2026-10-26 MINOR (ADR-0037): poison bodies are dead-lettered as the ADR-0035 record and the version gate follows one diff --git a/pom.xml b/pom.xml index 6daabfe..a300e94 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.babelqueue babelqueue-artemis - 1.1.0 + 1.1.1 jar BabelQueue Apache ActiveMQ Artemis @@ -49,7 +49,7 @@ 17 UTF-8 UTF-8 - 1.13.0 + 1.14.0 3.1.0 5.10.3 5.12.0 diff --git a/src/main/java/com/babelqueue/artemis/ArtemisConsumer.java b/src/main/java/com/babelqueue/artemis/ArtemisConsumer.java index 2fc07ef..3244463 100644 --- a/src/main/java/com/babelqueue/artemis/ArtemisConsumer.java +++ b/src/main/java/com/babelqueue/artemis/ArtemisConsumer.java @@ -4,7 +4,6 @@ import com.babelqueue.DeadLetters; import com.babelqueue.Envelope; import com.babelqueue.EnvelopeCodec; -import com.babelqueue.JsonValues; import com.babelqueue.PoisonRecord; import com.babelqueue.UnknownUrnException; import com.babelqueue.UnknownUrnStrategy; @@ -18,7 +17,6 @@ import jakarta.jms.TextMessage; import java.nio.charset.StandardCharsets; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; import java.util.function.BooleanSupplier; @@ -298,15 +296,7 @@ private void deadLetterPoison(Message message, Throwable cause) throws JMSExcept * {@code poison_dlq} case reaches it through {@link #poll()}, invalid UTF-8 as a {@code BytesMessage}). */ static String poisonRecord(byte[] body, String originalQueue, int attempts, Throwable cause) { - Map block = new LinkedHashMap<>(); - block.put("reason", "poison"); - block.put("error", cause.getMessage()); - block.put("exception", cause.getClass().getName()); - block.put("failed_at", System.currentTimeMillis()); - block.put("original_queue", originalQueue); - block.put("attempts", attempts); - block.put("lang", EnvelopeCodec.SOURCE_LANG); - return PoisonRecord.build(body, JsonValues.encode(block)); + return PoisonRecord.build(body, originalQueue, attempts, cause.getMessage(), cause.getClass().getName()); } /** The consumed queue's name: the message's JMS destination, else the DLQ name without its {@code .dlq} suffix. */