Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I Shipped a Java Library to Maven Central, Solo

The dual-write problem shows up wherever a service needs to update its database and notify the outside world as one atomic step. The write succeeds and the publish fails, or the reverse, and two systems that were supposed to agree quietly stop agreeing. The usual fixes are heavyweight: two-phase commit, or a CDC pipeline like Debezium reading the database's transaction log. I built oncebox to…

Maven Central, the central repository for Java libraries, received its first contribution from a single person on October 11, 2025. The library, named oncebox, tackles the dual-write problem - ensuring database updates and message-broker notifications occur together. The creator built the solution from scratch, without relying on heavyweight approaches like two-phase commit or CDC pipelines.

oncebox works by writing events to an outbox table within the same transaction as the business write. A separate poller then safely publishes these events to Kafka or RabbitMQ, with exponential backoff if the broker fails. The failed events are retried and managed through a dead letter queue with its own REST API for inspection.

Developed by one person, oncebox consists of 13 Maven modules and 602 Java files, half of which are tests. The library supports PostgreSQL, MySQL, and Oracle databases, with Kafka and RabbitMQ as message brokers. After a year of solo development, the library has gone through five releases, v1.0.0 to v2.0.0.

Shipping the library involved more than just writing code. The creator had to handle GPG signing for verifiable releases, set up Sonatype/Central publishing flow, generate usable documentation, and configure various monitoring and testing tools. The outbox and inbox configurations are split into different sections for flexibility, and Grafana dashboards and a Postman collection provide easy access to the dead letter queue API.

The key to oncebox's design lies in its polling mechanism, which allows multiple instances to poll the same outbox table without blocking each other. The library also handles database-specific quirks, such as MySQL's gap locks under READ COMMITTED isolation level and Oracle's limitations on batch size.

The creator's focus on comprehensive testing, including unit, integration, concurrent, end-to-end, and load tests, ensured the library's reliability even without a second set of eyes. This level of testing, combined with the library's robust design, has resulted in a Maven Central release that other services can depend on confidently.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How to Practice Coding Interviews Without a Partner (5 Options, Prices Checked)

I built DevInterview.ai, one of the options below, so I'm biased. I put the free options in the same table. A practice partner gives you three things: a problem you haven't seen, follow-up questions…

  • Self-mock routine: Free method to practice coding interviews
  • DevInterview.ai: Simulates 30-minute coding round with live interviewer
  • Interviewing.io: Free AI Interviewer option with unknown pricing

Solved 300 LeetCode Problems but Still Freeze in Interviews? It's a Rehearsal Problem

I built DevInterview.ai, a mock interview tool, so take the product part with that in mind. The rest of this is free. If you've solved hundreds of LeetCode problems and still freeze in real…

  • Solving 300 LeetCode problems alone isn't enough for interview success
  • Interview setting adds pressure not present in solo practice
  • Key to success: practice actual interview conditions through drills

HJ Shipbuilding Completes First U.S. Navy MRO Project, Eyes Follow-On Contracts

HJ Shipbuilding & Construction has completed its first maintenance, repair and overhaul (MRO) project for the U.S. Navy, marking a significant step in the company’s efforts to expand into the defense…

  • HJ Shipbuilding completes first U.S. Navy MRO project
  • USNS Amelia Earhart, 40,000-ton ship, undergoes maintenance
  • Project value expanded due to additional maintenance work

Knowledge transfer when contractors rotate out: track what only they know before their end date

This article is AI-generated. A commenter on Hacker News put it plainly: "Even with the best documentation people will build up knowledge that no one has, and their departure is costly." With…

  • Contractors' unique knowledge often unshared, leading costly departures.
  • Tracker designed to manage contractor knowledge handover proactively.
  • Metrics track risk of knowledge loss when contractors end contracts.

From Broad SaaS to Micro-Niches: Architecting 8 Custom Landing Pages at Scale

** Building a robust SaaS application is only 20% of the battle. The other 80% is distribution. ** When I engineered JazzySend — a B2B web application designed for secure, automated email campaigns…

  • JazzySend restructured from single to eight industry-specific landing pages
  • Component-driven frontend architecture manages distinct pages without technical debt
  • Backend routing system validates micro-niche strategy with single webhook

More from Thursday 15 October →