Skip to content

Commit

Permalink
Extracted TramCommandReplyProducerConfiguration from TramCommandConsu…
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Aug 18, 2022
1 parent 790555c commit 859c9da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
import io.eventuate.tram.commands.consumer.CommandDispatcherFactory;
import io.eventuate.tram.commands.consumer.CommandReplyProducer;
import io.eventuate.tram.messaging.consumer.MessageConsumer;
import io.eventuate.tram.messaging.producer.MessageProducer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import(TramCommandReplyProducerConfiguration.class)
public class TramCommandConsumerConfiguration {

@Bean
public CommandDispatcherFactory commandDispatcherFactory(MessageConsumer messageConsumer, CommandNameMapping commandNameMapping, CommandReplyProducer commandReplyProducer) {
return new CommandDispatcherFactory(messageConsumer, commandNameMapping, commandReplyProducer);
}

@Bean
public CommandReplyProducer commandReplyProducer(MessageProducer messageProducer) {
return new CommandReplyProducer(messageProducer);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.eventuate.tram.spring.commands.consumer;

import io.eventuate.tram.commands.consumer.CommandReplyProducer;
import io.eventuate.tram.messaging.producer.MessageProducer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TramCommandReplyProducerConfiguration {
@Bean
public CommandReplyProducer commandReplyProducer(MessageProducer messageProducer) {
return new CommandReplyProducer(messageProducer);
}
}

0 comments on commit 859c9da

Please sign in to comment.