thomas
thomas
Explore posts from servers
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
Now it works (as in it doesn't crash) but the service doesn't print anything
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
No description
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
n i wrote serializer
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
lol the issue is that i should use a deserializer in the consumer
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
No description
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
the issue then is just this
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
ok so the activation isn't needed
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
@canton7 Hope this will help, if you want i can also send the repository where all this is at.
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
No description
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
with this error right here
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
No description
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
I'm just not sure about how to get the consumer to work
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
No description
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
upon create of an employee a message should be pushed to a queue
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
First one is how i setup my producer
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
EmployeeMS
c#
// Configure KafkaFlow
const string topicName = "employee-topic";
const string producerName = "employee-producer";

builder.Services.AddKafka(
kafka => kafka
.UseMicrosoftLog()
.AddCluster(
cluster => cluster
.WithBrokers(new[] { "localhost:9092" })
.CreateTopicIfNotExists(topicName, 1, 1)
.AddProducer(
producerName,
producer => producer
.DefaultTopic(topicName)
.AddMiddlewares(m =>
m.AddSerializer<JsonCoreSerializer>()
)
)
)
);
c#
// Configure KafkaFlow
const string topicName = "employee-topic";
const string producerName = "employee-producer";

builder.Services.AddKafka(
kafka => kafka
.UseMicrosoftLog()
.AddCluster(
cluster => cluster
.WithBrokers(new[] { "localhost:9092" })
.CreateTopicIfNotExists(topicName, 1, 1)
.AddProducer(
producerName,
producer => producer
.DefaultTopic(topicName)
.AddMiddlewares(m =>
m.AddSerializer<JsonCoreSerializer>()
)
)
)
);
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
Payroll MS (its inside the program.cs file)
c#
// Configure KafkaFlow
const string topicName = "employee-topic";
const string groupName = "payroll-consumer-group";

builder.Services.AddKafkaFlowHostedService(
kafka => kafka
.UseMicrosoftLog()
.AddCluster(cluster => cluster
.WithBrokers(new[] { "localhost:9092" })
.AddConsumer(consumer =>
consumer
.Topic(topicName)
.WithGroupId(groupName)
.WithBufferSize(100)
.WithWorkersCount(4)
.WithAutoOffsetReset(AutoOffsetReset.Latest)
.AddMiddlewares(middlewares => middlewares
.AddSerializer<JsonCoreSerializer>()
.AddTypedHandlers(handlers => handlers
.AddHandler<EmployeeCreatedHandler>()
)
)
)
)
);
c#
// Configure KafkaFlow
const string topicName = "employee-topic";
const string groupName = "payroll-consumer-group";

builder.Services.AddKafkaFlowHostedService(
kafka => kafka
.UseMicrosoftLog()
.AddCluster(cluster => cluster
.WithBrokers(new[] { "localhost:9092" })
.AddConsumer(consumer =>
consumer
.Topic(topicName)
.WithGroupId(groupName)
.WithBufferSize(100)
.WithWorkersCount(4)
.WithAutoOffsetReset(AutoOffsetReset.Latest)
.AddMiddlewares(middlewares => middlewares
.AddSerializer<JsonCoreSerializer>()
.AddTypedHandlers(handlers => handlers
.AddHandler<EmployeeCreatedHandler>()
)
)
)
)
);
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
im sorry
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
yeah my bad
39 replies
CC#
Created by thomas on 8/23/2024 in #help
Kafka Flow (Producer Consumer arch.)
can i show u what my producers and consumers look like?
39 replies