-
Notifications
You must be signed in to change notification settings - Fork 749
Enable Legacy Conventions
Atallah0 edited this page Aug 5, 2024
·
2 revisions
TL;DR
To enable the legacy type naming convention simply create the bus with LegacyTypeNaming()
option:
For EasyNetQ v8.x:
var serviceCollection = new ServiceCollection();
serviceCollection.AddEasyNetQ("host=localhost").UseLegacyTypeNaming();
using var provider = serviceCollection.BuildServiceProvider();
var bus = provider.GetRequiredService<IBus>();
For EasyNetQ v7.x:
var bus = RabbitHutch.CreateBus("host=localhost", x => x.EnableLegacyTypeNaming());
To enable the legacy RPC convention simply create the bus with LegacyRpcConventions()
option:
For EasyNetQ v8.x:
var serviceCollection = new ServiceCollection();
serviceCollection.AddEasyNetQ("host=localhost").UseLegacyRpcConventions();
using var provider = serviceCollection.BuildServiceProvider();
var bus = provider.GetRequiredService<IBus>();
For EasyNetQ v7.x:
var bus = RabbitHutch.CreateBus("host=localhost", x => x.EnableLegacyRpcConventions());
To enable both the legacy type naming convention and the legacy RPC convention simply create the bus with LegacyConventions()
option:
For EasyNetQ v8.x:
var serviceCollection = new ServiceCollection();
serviceCollection.AddEasyNetQ("host=localhost").UseLegacyConventions();
using var provider = serviceCollection.BuildServiceProvider();
var bus = provider.GetRequiredService<IBus>();
For EasyNetQ v7.x:
var bus = RabbitHutch.CreateBus("host=localhost", x => x.EnableLegacyConventions());
Long story
Before v3 the queue and exchange name were something like this:
Exchange: EasyNetQ.Tests.TestPerformanceMessage:EasyNetQ.Tests.Common
Queue: EasyNetQ.Tests.TestPerformanceMessage:EasyNetQ.Tests.Common_consumer
The new format has become this:
Exchange: EasyNetQ.Tests.TestPerformanceMessage, EasyNetQ.Tests.Common
Queue: EasyNetQ.Tests.TestPerformanceMessage, EasyNetQ.Tests.Common_consumer
There isn't only the comma difference, to see all the differences check both serializers DefaultTypeNameSerializer >=v3 and LegacyTypeNameSerializer <=v2
- Quick Start
- Introduction
- A Note on Versioning
- Installing EasyNetQ
- Connecting to RabbitMQ
- Connecting with SSL
- Logging
- Logging v8.x
- Publish
- Subscribe
- Request Response
- Send Receive
- Topic Based Routing
- Controlling Queue names
- Polymorphic Publish and Subscribe
- Versioning Messages
- Publisher Confirms
- Scheduling Events with Future Publish
- Support for Delayed Messages Plugin
- Auto Subscriber
- Auto Subscriber v8.x
- Error Conditions
- Re Submitting Error Messages With EasyNetQ.Hosepipe
- The Advanced API
- Cluster Support
- Wiring up EasyNetQ with TopShelf and Windsor
- Replacing EasyNetQ Components
- Using Alternative DI Containers
- Enable Legacy Conventions