All notable changes to com.babelqueue:babelqueue-pulsar are documented here.
The format is based on Keep a Changelog, and
this project adheres to Semantic Versioning.
The envelope wire format is versioned separately by meta.schema_version
(currently 1) — see the contract at babelqueue.com.
- Optional
onRoutingMismatchhook on the consumer builder: called with the property URN, the body URN and the envelope whenbq-jobdiffers from the body'sjob. Defaults to a no-op; a throwing hook is swallowed. New public API, so the next release is a MINOR.
PulsarConsumernow version-gates on thebq-schema-versionmessage property before decoding the body (§5.7 step 3, MUST). A present value that is not exactly the core's supported schema version (EnvelopeCodec.SCHEMA_VERSION; compared exactly as sent, with no trimming; so"2","x","01"and" 1"are rejected) skips decoding and routing:onErrorreceives aBabelQueueExceptionnaming the property (envelope argument isnull) and the message isnegativeAcknowledged, like a non-conformant envelope. A missing/blank (empty or ASCII-whitespace-only: space, tab, LF, VT, FF, CR; NBSP, U+0085, U+FEFF etc. are not blank) property and a supported value behave as before (the post-decodeaccepts()check is unchanged). No public API or wire change;schema_versionstays 1.PulsarConsumernow follows the normative §5.2/§5.7 rules: it routes on thebq-jobmessage property (the body'sjob/urnis used only when the property is absent or blank) and takesattemptsfrom the authoritativebq-attemptsproperty (falling back to the body's value when it does not match^[0-9]+$— ASCII digits only, no sign or whitespace, withinint), still raised togetRedeliveryCount()when that is higher. Previously it routed on the decoded body and ignoredbq-attempts. Whenbq-jobdiffers from the body'sjob, the new optionalonRoutingMismatchhook is called (property URN, body URN, envelope/message); the property still routes, a throwing hook is swallowed andonErroris untouched. No breaking public API or wire change (only the optional hook is added);schema_versionstays 1.
- Initial release. An Apache Pulsar transport on
babelqueue-core+org.apache.pulsar:pulsar-client:PulsarPublisher(canonical-envelope send with the §5 property projection —bq-job= URN,bq-trace-id=trace_id,bq-message-id=meta.id, plusbq-schema-version/bq-source-lang/bq-attempts; nativedeliverAfterfor delays) andPulsarConsumer(receive → URN-routedBabelHandlers →acknowledge; a throwing handlernegativeAcknowledges for at-least-once redelivery;attemptsreconciled tomax(bq-attempts, getRedeliveryCount())— Pulsar's redelivery count is 0-based so it maps directly with no −1, and themaxkeeps a republish-driven retry and a native negative-ack redelivery in agreement;onError/onUnknownUrnhooks). Java 17, JUnit 5, JaCoCo ≥90% line coverage; theProducer/Consumer/Message/TypedMessageBuilderinterfaces are mocked with Mockito 5 (no Pulsar, no network). The envelope is unchanged (schema_version: 1); Apache Pulsar is purely additive.