chore(arc): add ConsumerTemplate and ProducerTemplate producers
@@ -20,6 +20,8 @@ import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import org.apache.camel.CamelContext;
+import org.apache.camel.ConsumerTemplate;
+import org.apache.camel.ProducerTemplate;
import org.apache.camel.spi.Registry;
@ApplicationScoped
@@ -37,6 +39,16 @@ public class CamelProducers {
return camelRuntime.getRegistry();
}
+ @Produces
+ public ProducerTemplate getCamelProducerTemplate() {
+ return camelRuntime.getContext().createProducerTemplate();
+ }
+
+ @Produces
+ public ConsumerTemplate getCamelConsumerTemplate() {
+ return camelRuntime.getContext().createConsumerTemplate();
+ }
+
@Produces
public CamelConfig.BuildTime getCamelBuildTimeConfig() {
return camelRuntime.getBuildTimeConfig();
