Conversation
* Initial plan * Add Scala data structures for DelayedQueue - Created all configuration types (RetryConfig, JdbcDatabasePoolConfig, DelayedQueueTimeConfig, JdbcConnectionConfig, DelayedQueueJDBCConfig) - Created message and envelope types (ScheduledMessage, BatchedMessage, BatchedReply, AckEnvelope, MessageId, DeliveryType) - Created cron/scheduling types (CronMessage, CronConfigHash, CronDailySchedule, CronMessageGenerator) - Created return/outcome types (OfferOutcome, ResourceUnavailableException, JdbcDriver) - Added asJava and asScala conversion extensions for all types - All code compiles and is formatted Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Add tests for Scala data structures - Created test suites for RetryConfig, ScheduledMessage, JdbcDriver, and Cron types - All tests verify conversions (asJava/asScala), validation, and basic functionality - All 23 tests pass Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Address PR feedback: use Scala types, opaque MessageId, fix implementations - Replace java.time.Duration with scala.concurrent.duration.FiniteDuration - Make MessageId an opaque type instead of case class - Fix OfferOutcome pattern matching to use instanceof checks - Add covariance (+In, +A) to BatchedMessage and BatchedReply - Port CronConfigHash, CronDailySchedule implementations exactly from JVM - Add ScalaCheck and munit-scalacheck dependencies for property-based testing - Remove unused imports Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Add property-based testing with ScalaCheck - Add comprehensive property-based tests for all data structures - Test roundtrip conversions (asJava/asScala) - Test covariance for BatchedMessage and BatchedReply - Test validation for RetryConfig and CronDailySchedule - Test CronMessage key uniqueness - All 35 tests pass (23 unit + 12 property-based) Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Refactor: delegate implementations to JVM, use idiomatic Scala patterns Major changes per review feedback: - DeliveryType enum: Use Scala naming (FirstDelivery, Redelivery) - CronConfigHash: Changed to opaque type, delegate to JVM implementations - All factory methods delegate to JVM (fromDailyCron, fromPeriodicTick, fromString) - CronDailySchedule.getNextTimes delegates to JVM - CronMessage.key and staticPayload delegate to JVM - DelayedQueueTimeConfig defaults use JVM constants - JdbcConnectionConfig: username/password now Option - JdbcDatabasePoolConfig: Removed default parameters, added DEFAULT value - JdbcDriver: Private constructor, use JVM as source of truth with jvmEntries map - Test generators moved to common Generators.scala file - Removed fromClassName test as requested - All 34 tests pass Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Remove default parameters and delegate to JVM defaults - DelayedQueueJDBCConfig: Removed default parameters for ackEnvSource and retryPolicy - RetryConfig: Removed all default parameters (backoffFactor, maxRetries, totalSoftTimeout, perTryHardTimeout) - RetryConfig.DEFAULT and NO_RETRIES now delegate to JVM constants via asScala - Updated tests to provide all required parameters - All 34 tests pass Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com>
* Initial plan * Implement DelayedQueueInMemory Scala wrapper with tests - Created DelayedQueueInMemory.scala wrapping JVM implementation - Implemented all DelayedQueue trait methods with proper type conversions - Added CronService wrapper for cron functionality - Created comprehensive test suite (19 tests, all passing) - Follows existing patterns (asScala/asJava conversions) - Uses Cats Effect IO for side effects management Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Change to F[_] * Fix API again * Reformatting * Remove junk * Add concurrency test --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> Co-authored-by: Alexandru Nedelcu <noreply@alexn.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The plan is to wrap DelayedQueue JVM in a Scala-friendly API powered by Cats-Effect and functional programming.