Skip to content

Releases: ThreeDotsLabs/watermill-sql

v4.1.2

28 Oct 19:23
e26c90d

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.1.1...v4.1.2

v4.1.1

23 Oct 09:32
3b87c0a

Choose a tag to compare

What's Changed

Full Changelog: v4.1.0...v4.1.1

v4.1.0

22 Oct 13:13
4683792

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.0.0...v4.1.0

v4.0.0

25 Aug 15:08

Choose a tag to compare

Major version bump (v4)

Breaking changes

Schema & Offsets adapters interfaces

  • Reworked the SchemaAdapter and OffsetsAdapter interfaces (Breaking change -> will bump the major to v4).
    • We had a few instances where some details have been missing from one of the interface methods. It makes it difficult to extend this library with new features, as each will require a major version bump, and we want to avoid it if possible.
    • To mitigate this, we're moving to a params struct passed to the methods instead of raw arguments. It adds some verbosity but allows extending the params if needed with no breaking changes to the library.
    • The methods now also return errors.

Migration: if you don't use a custom schema/offsets adapter, you don't need to do anything. If you do, change the methods to implement the new interfaces. Use values from the params argument and return errors.

Beginner accepted in place of *sql.DB

watermill-sql now supports any SQL connection, not just *sql.DB. For example, you can use pgx handle and transactions.

Migration: You need to wrap your db connection with a new constructor when passing it to NewSubscriber and NewPublisher: sql.BeginnerFromStdSQL(db)

See the example:

	subscriber, err := sql.NewSubscriber(
		sql.BeginnerFromStdSQL(db),
		sql.SubscriberConfig{
			SchemaAdapter:    sql.DefaultMySQLSchema{},
			OffsetsAdapter:   sql.DefaultMySQLOffsetsAdapter{},
			InitializeSchema: true,
		},
		logger,
	)

	publisher, err := sql.NewPublisher(
		sql.BeginnerFromStdSQL(db),
		sql.PublisherConfig{
			SchemaAdapter: sql.DefaultMySQLSchema{},
		},
		logger,
	)

What's Changed

New Contributors

Full Changelog: v3.1.0...v4.0.0

v4.0.0-rc.6

12 Jun 10:24
e46e72f

Choose a tag to compare

v4.0.0-rc.6 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v4.0.0-rc.5...v4.0.0-rc.6

v4.0.0-rc.5

30 Apr 08:06
8309d5e

Choose a tag to compare

v4.0.0-rc.5 Pre-release
Pre-release

What's Changed

  • Fix logger error fields not clearing in the Subscriber consume method by @petergere in #49

New Contributors

Full Changelog: v4.0.0-rc.4...v4.0.0-rc.5

v4.0.0-rc.4

31 Jan 14:08
33558e7

Choose a tag to compare

v4.0.0-rc.4 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v4.0.0-rc.3...v4.0.0-rc.4

v4.0.0-rc.3

30 Jan 15:40
4fa1e7a

Choose a tag to compare

v4.0.0-rc.3 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v4.0.0-rc.2...v4.0.0-rc.3

v4.0.0-rc.2

18 Dec 12:49
485f63c

Choose a tag to compare

v4.0.0-rc.2 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v4.0.0-rc.1...v4.0.0-rc.2

v4.0.0-rc.1

25 Oct 13:23
730d8ef

Choose a tag to compare

v4.0.0-rc.1 Pre-release
Pre-release
  • Added PostgreSQLQueueSchema and PostgreSQLQueueOffsetsAdapter.
    • This schema is similar to the original one, except it allows filtering messages with a custom WHERE clause.
    • It doesn't support customer groups.
    • It allows deleting messages from the table after acking (optional).
  • Added NewDelayedPostgreSQLPublisher and NewDelayedPostgresSQLSubscriber
    • They work on top of the conditional schema and use the delay component implemented in ThreeDotsLabs/watermill#469
    • The idea is to receive messages with a delay or at a given time in a simple way.
  • Reworked the SchemaAdapter and OffsetsAdapter interfaces (Breaking change -> will bump the major to v4).
    • We had a few instances where some details have been missing from one of the interface methods. It makes it difficult to extend this library with new features, as each will require a major version bump, and we want to avoid it if possible.
    • To mitigate this, we're moving to a params struct passed to the methods instead of raw arguments. It adds some verbosity but allows extending the params if needed with no breaking changes to the library.
    • The methods now also return errors.
    • Migration: if you don't use a custom schema/offsets adapter, you don't need to do anything. If you do, change the methods to implement the new interfaces. Use values from the params argument and return errors.