Closed jeroenrinzema closed 5 years ago
Rewriting the way how groups and dialects are defined could probably open new ways to define streaming between dialects.
dialect := kafka.NewDialect("...connectionstring")
bank := commander.NewGroup(
commander.NewTopic("events", dialect, commander.EventMessage, commander.Consume),
commander.NewTopic("commands", dialect, commander.CommandMessage, commander.Consume | commander.Produce)
)
client := commander.NewClient(bank)
Businesses have a lot of times multiple pieces of infrastructure which requires integrations to be made. Streaming between dialects could allow two totally different dialects to stream from one another (ex: Redis - Kafka, Kafka - RabbitMQ).
This requires the consume, handle and writer interfaces to be modified. The API should feel natural and not in the way. An idea is to move the consuming and writing from the groups to the dialect.
and the writer to include the dialect.