DEV Community

Cover image for Announcing Brighter V10: A Major Release with Cloud Events, New Providers, and Enhanced Resilience
Rafael Andrade
Rafael Andrade

Posted on

Announcing Brighter V10: A Major Release with Cloud Events, New Providers, and Enhanced Resilience

After several years of dedicated development, Brighter V10 has officially launched! While we’ll continue supporting Brighter V9 for the next few months—and possibly into next year or beyond—this release marks a significant milestone in Brighter. Planning for V11 may begin in the coming year, but for now, let’s dive into what’s new in V10.

What's New in V10?

Brighter V10 introduces a host of powerful new features and integrations designed to streamline your development process.

Cloud Events support

Brighter V10 now embraces the CloudEvents specification by default. This ensures greater interoperability across different services and platforms by automatically setting the standardized event headers, making your distributed systems more robust and vendor-agnostic.

Default message mapper

You no longer need to write a custom message mapper when using JSON. Brighter includes a built-in default message mapper for standard JSON serialization. Additionally, a dedicated mapper is available for CloudEvents in JSON format, simplifying integration with CloudEvents-compliant platforms.

Integrated Message Scheduler

Delayed message processing is now a first-class citizen. Brighter V10 introduces a new message scheduler with native support for popular scheduling backends, including Quartz.NET, Hangfire, and AWS Scheduler. Scheduling a command for future execution is now as simple as:

processor.Post(TimeSpan.FromSeconds(10), new SomeCommand());
Enter fullscreen mode Exit fullscreen mode

Polly Resilience Pipeline Integration

We have upgraded our resilience capabilities by integrating with Polly's modern Resilience Pipeline API. This provides a more powerful and flexible way to configure policies like retries, circuit breakers, and timeouts for your command and event processing.

services.AddBrighter(opt =>
{
    var resiliencePipelineRegistry = new ResiliencePipelineRegistry<string>(); 
    resiliencePipelineRegistry.AddBrighterDefault();
    ....

    opt.ResiliencePipelineRegistry = resiliencePipelineRegistry;

})
Enter fullscreen mode Exit fullscreen mode

Enhanced Nullable Reference Type Support

We’ve significantly improved nullable reference type annotations across the codebase, leading to safer and more predictable code when using nullable-enabled projects.

Expanded Provider Support

We've significantly broadened Brighter's integration ecosystem with new first-class providers:

  • MongoDB: Full support for using MongoDB as an Inbox, Outbox, and for Distributed Locks.
  • RocketMQ: Native support for the RocketMQ messaging gateway.
  • Postgres: Support to use Postgres messaging gateway.
  • Google Cloud Platform: Support for GCP, including:
    • Pub/Sub as a messaging gateway.
    • Firestore for Inbox, Outbox, and Distributed Lock.
    • Spanner for the Inbox and Outbox patterns.
  • AWS SDK V4: A new implementation for the latest AWS SDK for .NET (V4), provided in packages with a V4 suffix alongside the existing V3 support.
  • Enhanced AWS Support:
    • Improved LocalStack Compatibility: Resolved known issues for a smoother local development experience.
    • Advanced SQS/SNS Features: Added support for direct-to-SQS publishing and SNS/SQS FIFO (First-In-First-Out) topics and queues.
  • RabbitMQ: Support to RabbitMQ Client V7 & Quorum Queue

Breaking Changes

As a major version update, V10 includes several breaking changes aimed at improving the long-term health and usability of the library.

Dropping .NET 6 Support

Brighter V10 now targets .NET 8, .NET 9.0 and .NET Standard 2.0. In line with Microsoft's support policy, we have dropped support for .NET 6, which is no longer in its Long-Term Support (LTS) window. To upgrade to Brighter V10, you must update your project's target framework.

Clear Separation of Sync and Async APIs

To provide a clearer and more explicit API, we have separated synchronous and asynchronous interfaces. You will now find distinct interfaces with Async and Sync suffixes.

Example: Message Mappers IAmAMessageMapper is now used for synchronous mapping, while a new IAmAMessageMapperAsync interface is available for asynchronous operations. Please update your custom mappers to implement the appropriate interface.

Primitive Obsession Reduction

To improve type safety and domain clarity, we have replaced primitive types (like string) for key concepts such as IDs and partition keys with dedicated types (Id, PartitionKey, etc.). To ensure a smoother migration, implicit conversions from string to these new types have been implemented.

As a bonus, the new Id.Random() method will default to generating UUID v7 when running on .NET 9+.

Microsoft Dependency Injection changes

The dependency injection setup has been streamlined. We have introduced a more fluent and intuitive configuration API for setting up Brighter services in your IServiceCollection. see:

// V9
services.AddServiceActivator(opt =>
{
    opt.Subscriptions = /* ...subscription configuration... */;
    opt.ChannelFactory = new ChannelFactory(connection);
})
.UseExternalBus(new SnsProducerRegistryFactory(...).Create());
Enter fullscreen mode Exit fullscreen mode
// V10
services.AddConsumers(opt =>
{
    opt.Subscriptions = /* ...simplified subscription configuration... */;
    opt.DefaultChannelFactory = new ChannelFactory(connection);
})
.AddProducers(opt =>
{
    opt.ProducerRegistry = new CombinedProducerRegistryFactory(
        new SnsMessageProducerFactory(...),
        new SqsMessageProducerFactory(...)
    ).Create();
});

Enter fullscreen mode Exit fullscreen mode

Please refer to our documentation for the new registration methods.

Package Renaming and Retirements

Brighter has renaming & stop publishing some packages

Renamed Packages:

  • Paramore.Brighter.MessagingGateway.RMQParamore.Brighter.MessagingGateway.RMQ.Sync
  • Paramore.Brighter.Extensions.HostingParamore.Brighter.Outbox.Hosting
  • Paramore.Brighter.MsSql.Dapper → Paramore.Brighter.Dapper
  • Paramore.Brighter.Tranformers.AWSParamore.Brighter.Transformers.AWS (Spelling corrected)

Retired Packages (Support Removed in V10):

  • Paramore.Brighter.MessagingGateway.RESTMS
  • Paramore.Brighter.Outbox.EventStore

Action Required: If your project depends on a retired package, please open an issue on our GitHub repository to discuss.

Conclusion

Brighter V10 represents a significant step forward, embracing modern .NET practices and cloud-native standards. With new features like Cloud Events, a default message mapper, and expanded provider support for MongoDB, GCP, and RocketMQ.

We are excited for you to try it out and look forward to your feedback. For detailed migration guides and documentation, please visit our GitHub repository.

Top comments (0)