.NET Plugin Events
Create Message Broker Client Options Factory
Get Started
Lifecycle & Coding Details
Developing a Plugin
Guides & Tutorials
Blueprint Plugin Events
Node.js Plugin Events
- Create Server
- Create Server Docker Compose
- Create Server Docker Compose Dev
- Create Server Dot Env
- Create Server Auth
- Create Package Json
- Create Entity Service
- Create Entity Service Base
- Create Entity Controller
- Create Entity Controller Base
- Create Entity Resolver
- Create Entity Resolver Base
- Create Message Broker Service
- Create Message Broker Service Base
- Create Message Broker NestJS Module
- Create Message Broker Client Options Factory
- Create Message Broker Topics Enum
- Create Prisma Schema
.NET Plugin Events
- Create Server
- Create Server Appsettings
- Create Server Auth
- Create Program File
- Create Server Csproj
- Create Server Docker Compose
- Create Server Git Ignore
- Create Entity Model
- Create Resource Db Context File
- Create Message Broker
- Create Message Broker Client Options Factory
- Create Message Broker Service
- Create Entity Controller
- Create Entity Controller Base
- Create DTOs
- Create Entity Extensions
- Create Entity Interface
- Create Entity Service
- Create Entity Service Base
- Create Seed Development Data File
- Load Static Files
.NET Plugin Events
Create Message Broker Client Options Factory
Creates the client options factory for the message broker.
afterCreateMessageBrokerClientOptionsFactory(
context: dotnetTypes.DsgContext,
eventParams: dotnet.CreateMessageBrokerClientOptionsFactoryParams,
files: FileMap<Class>
): Promise<FileMap<Class>> {
const optionsFactoryFile = files.get("MessageBroker/MessageBrokerClientOptionsFactory.cs");
if (optionsFactoryFile) {
optionsFactoryFile.code.addMethod(
CsharpSupport.method({
name: "CreateConsumerConfig",
access: "public",
returnType: CsharpSupport.Types.reference("ConsumerConfig"),
body: `return new ConsumerConfig { GroupId = "my-consumer-group" };`,
})
);
}
return files;
}
Event Name
CreateMessageBrokerClientOptionsFactory
Event Parameters
This event does not use any additional parameters.
afterCreateMessageBrokerClientOptionsFactory(
context: dotnetTypes.DsgContext,
eventParams: dotnet.CreateMessageBrokerClientOptionsFactoryParams,
files: FileMap<Class>
): Promise<FileMap<Class>> {
const optionsFactoryFile = files.get("MessageBroker/MessageBrokerClientOptionsFactory.cs");
if (optionsFactoryFile) {
optionsFactoryFile.code.addMethod(
CsharpSupport.method({
name: "CreateConsumerConfig",
access: "public",
returnType: CsharpSupport.Types.reference("ConsumerConfig"),
body: `return new ConsumerConfig { GroupId = "my-consumer-group" };`,
})
);
}
return files;
}
Was this page helpful?
afterCreateMessageBrokerClientOptionsFactory(
context: dotnetTypes.DsgContext,
eventParams: dotnet.CreateMessageBrokerClientOptionsFactoryParams,
files: FileMap<Class>
): Promise<FileMap<Class>> {
const optionsFactoryFile = files.get("MessageBroker/MessageBrokerClientOptionsFactory.cs");
if (optionsFactoryFile) {
optionsFactoryFile.code.addMethod(
CsharpSupport.method({
name: "CreateConsumerConfig",
access: "public",
returnType: CsharpSupport.Types.reference("ConsumerConfig"),
body: `return new ConsumerConfig { GroupId = "my-consumer-group" };`,
})
);
}
return files;
}