public void Initialize(ExtensionConfigContext context)
        {
            configuration.ConfigurationSection.Bind(options);

            // register our trigger binding provider
            var triggerBindingProvider = new KafkaTriggerAttributeBindingProvider(config, options, converterManager, nameResolver, loggerFactory);

            context.AddBindingRule <KafkaTriggerAttribute>()
            .BindToTrigger(triggerBindingProvider);

            // register output binding
            context.AddBindingRule <KafkaAttribute>().Bind(new KafkaAttributeBindingProvider(config, nameResolver, this.kafkaProducerFactory));
        }
Example #2
0
        public void Initialize(ExtensionConfigContext context)
        {
            configuration.ConfigurationSection.Bind(options);

            context
            .AddConverter <KafkaEventData, string>(ConvertKafkaEventData2String)
            .AddConverter <KafkaEventData, ISpecificRecord>(ConvertKafkaEventData2AvroSpecific)
            .AddConverter <KafkaEventData, byte[]>(ConvertKafkaEventData2Bytes);

            // register our trigger binding provider
            var triggerBindingProvider = new KafkaTriggerAttributeBindingProvider(config, options, converterManager, nameResolver, loggerFactory);

            context.AddBindingRule <KafkaTriggerAttribute>()
            .BindToTrigger(triggerBindingProvider);

            // register output binding
            context.AddBindingRule <KafkaAttribute>()
            .BindToCollector(BuildCollectorFromAttribute);
        }