Releases: ThreeDotsLabs/watermill-sql
v4.1.2
What's Changed
- Fix PostgreSQL DelayedSubscriber timezone query bug by @AlfandiMario in #53
New Contributors
- @AlfandiMario made their first contribution in #53
Full Changelog: v4.1.1...v4.1.2
v4.1.1
What's Changed
- Add delayed mysql requeuer by @AdrianZajkowski in #52
Full Changelog: v4.1.0...v4.1.1
v4.1.0
What's Changed
- Add MySQL support for delayed message publishing by @AdrianZajkowski in #51
New Contributors
- @AdrianZajkowski made their first contribution in #51
Full Changelog: v4.0.0...v4.1.0
v4.0.0
Major version bump (v4)
Breaking changes
Schema & Offsets adapters interfaces
- Reworked the
SchemaAdapterandOffsetsAdapterinterfaces (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
paramsstruct 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
- Add PostgreSQLQueue and DelayedPostgreSQL Pub/Sub by @m110 in #34
- fix comment formatting by @roblaszczak in #41
- Bump golang.org/x/crypto from 0.20.0 to 0.31.0 by @dependabot[bot] in #40
- streamline the database interfaces and add pgx adapter by @julesjcraske in #29
- Bump pgx to v5.7.2 and update transactionID type to pgtype.Uint64 by @Abdullah-AlAttar in #43
- Add missing TxFromPgx by @m110 in #42
- Make subscriber close safe to concurrently close by @jjcollinge in #44
- Add xid8 by @m110 in #45
- Fix logger error fields not clearing in the Subscriber consume method by @petergere in #49
- Fix validation of subscriber ack deadline by @edebernis in #50
- Bump golang.org/x/crypto from 0.31.0 to 0.35.0 by @dependabot[bot] in #48
- Fix performance and tests by @m110 in #46
- Publish context by @rhhammond in #47
New Contributors
- @julesjcraske made their first contribution in #29
- @Abdullah-AlAttar made their first contribution in #43
- @jjcollinge made their first contribution in #44
- @petergere made their first contribution in #49
- @edebernis made their first contribution in #50
- @rhhammond made their first contribution in #47
Full Changelog: v3.1.0...v4.0.0
v4.0.0-rc.6
What's Changed
- Fix validation of subscriber ack deadline by @edebernis in #50
New Contributors
- @edebernis made their first contribution in #50
Full Changelog: v4.0.0-rc.5...v4.0.0-rc.6
v4.0.0-rc.5
What's Changed
- Fix logger error fields not clearing in the Subscriber consume method by @petergere in #49
New Contributors
- @petergere made their first contribution in #49
Full Changelog: v4.0.0-rc.4...v4.0.0-rc.5
v4.0.0-rc.4
What's Changed
- Add missing TxFromPgx by @m110 in #42
- Make subscriber close safe to concurrently close by @jjcollinge in #44
- Add xid8 by @m110 in #45
New Contributors
- @jjcollinge made their first contribution in #44
Full Changelog: v4.0.0-rc.3...v4.0.0-rc.4
v4.0.0-rc.3
What's Changed
- Bump pgx to v5.7.2 and update transactionID type to pgtype.Uint64 by @Abdullah-AlAttar in #43
New Contributors
- @Abdullah-AlAttar made their first contribution in #43
Full Changelog: v4.0.0-rc.2...v4.0.0-rc.3
v4.0.0-rc.2
What's Changed
- fix comment formatting by @roblaszczak in #41
- Bump golang.org/x/crypto from 0.20.0 to 0.31.0 by @dependabot in #40
- streamline the database interfaces and add pgx adapter by @julesjcraske in #29
New Contributors
- @julesjcraske made their first contribution in #29
Full Changelog: v4.0.0-rc.1...v4.0.0-rc.2
v4.0.0-rc.1
- Added
PostgreSQLQueueSchemaandPostgreSQLQueueOffsetsAdapter.- This schema is similar to the original one, except it allows filtering messages with a custom
WHEREclause. - It doesn't support customer groups.
- It allows deleting messages from the table after acking (optional).
- This schema is similar to the original one, except it allows filtering messages with a custom
- Added
NewDelayedPostgreSQLPublisherandNewDelayedPostgresSQLSubscriber- They work on top of the conditional schema and use the
delaycomponent implemented in ThreeDotsLabs/watermill#469 - The idea is to receive messages with a delay or at a given time in a simple way.
- They work on top of the conditional schema and use the
- Reworked the
SchemaAdapterandOffsetsAdapterinterfaces (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
paramsstruct 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
paramsargument and return errors.