diff --git a/README.md b/README.md index 542f34d11..ef030da24 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,6 @@ for building event driven applications, enabling event sourcing, RPC over messag sagas and basically whatever else comes to your mind. You can use conventional pub/sub implementations like Kafka or RabbitMQ, but also HTTP or MySQL binlog if that fits your use case. -**Note:** This is README file is created for `master`. You may want to check README [for release v0.4.0.](https://github.com/ThreeDotsLabs/watermill/tree/v0.4.0#watermill) - Documentation: https://watermill.io/ Getting started guide: https://watermill.io/docs/getting-started/ @@ -89,12 +87,23 @@ All contributions are very much welcome. If you'd like to help with Watermill de please see [open issues](https://github.com/ThreeDotsLabs/watermill/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+) and submit your pull request via GitHub. +## Stability + +Watermill v1.0.0 has been released and is production-ready. The public API is stable and will not change without changing the major version. + +To ensure that all Pub/Subs are stable and safe to use in production, we created a [set of tests](https://github.com/ThreeDotsLabs/watermill/blob/master/pubsub/tests/test_pubsub.go#L34) that need to pass for each of the implementations before merging to master. +All tests are also executed in [*stress*](https://github.com/ThreeDotsLabs/watermill/blob/master/pubsub/tests/test_pubsub.go#L171) mode - that means that we are running all the tests **20x** in parallel. + +All tests are run with the race condition detector enabled (`-race` flag in tests). + ## Support If you didn't find the answer to your question in [the documentation](https://watermill.io/), feel free to ask us directly! Please join us on the `#watermill` channel on the [Gophers slack](https://gophers.slack.com/): You can get an invite [here](https://gophersinvite.herokuapp.com/). +Every bit of feedback is very welcome and appreciated. Please submit it using [the survey](https://www.surveymonkey.com/r/WZXD392). + ## Why the name? It processes streams! diff --git a/UPGRADE-1.0.md b/UPGRADE-1.0.md index fd5ee62b4..83728239c 100644 --- a/UPGRADE-1.0.md +++ b/UPGRADE-1.0.md @@ -1,6 +1,24 @@ -# TODO +# Upgrade instructions from v0.4.X -Migrating Pub/Subs +In v1.0.0 we introduced a couple of breaking changes, to keep a stable API until version v2. + +## Migrating Pub/Subs + +All Pub/Subs (excluding go-channel implementation) were moved to separated repositories. +You can replace all import paths, with provided `sed`: find . -type f -iname '*.go' -exec sed -i -E "s/github\.com\/ThreeDotsLabs\/watermill\/message\/infrastructure\/(amqp|googlecloud|http|io|kafka|nats|sql)/github.com\/ThreeDotsLabs\/watermill-\1\/pkg\/\1/" "{}" +; find . -type f -iname '*.go' -exec sed -i -E "s/github\.com\/ThreeDotsLabs\/watermill\/message\/infrastructure\/gochannel/github\.com\/ThreeDotsLabs\/watermill\/pubsub\/gochannel/" "{}" +; + +# Breaking changes +- `message.PubSub` interface was removed +- `message.NewPubSub` constructor was removed +- `message.NoPublishHandlerFunc` is now passed to `message.Router.AddNoPublisherHandler`, instead of `message.HandlerFunc`. +- `message.Router.Run` now requires `context.Context` in parameter +- `PrometheusMetricsBuilder.DecoratePubSub` was removed (because of `message.PubSub` interface removal) +- `cars.ObjectName` was renamed to `cqrs.FullyQualifiedStructName` +- `github.com/ThreeDotsLabs/watermill/message/infrastructure/gochannel` was moved to `github.com/ThreeDotsLabs/watermill/pubsub/gochannel` +- `middleware.Retry` configuration parameters have been renamed +- Universal Pub/Sub tests have been moved from `github.com/ThreeDotsLabs/watermill/message/infrastructure` to `github.com/ThreeDotsLabs/watermill/pubsub/tests` +- All universal tests require now `TestContext`. +- Removed `context` from `googlecloud.NewPublisher` diff --git a/log.go b/log.go index 5a44761aa..2b7481543 100644 --- a/log.go +++ b/log.go @@ -35,6 +35,8 @@ func (l LogFields) Copy() LogFields { return cpy } +// LoggerAdapter is an interface, that you need to implement to support Watermill logging. +// You can use StdLoggerAdapter as a reference implementation. type LoggerAdapter interface { Error(msg string, err error, fields LogFields) Info(msg string, fields LogFields)