diff --git a/src/Transports/Kafka/Wolverine.Kafka/KafkaListenerConfiguration.cs b/src/Transports/Kafka/Wolverine.Kafka/KafkaListenerConfiguration.cs index 2407cd407..b5f9c400b 100644 --- a/src/Transports/Kafka/Wolverine.Kafka/KafkaListenerConfiguration.cs +++ b/src/Transports/Kafka/Wolverine.Kafka/KafkaListenerConfiguration.cs @@ -12,5 +12,15 @@ public KafkaListenerConfiguration(Func source) : base(source) { } - + /// + /// Use a custom interoperability strategy to map Wolverine messages to an upstream + /// system's protocol + /// + /// + /// + public KafkaListenerConfiguration UseInterop(IKafkaEnvelopeMapper mapper) + { + add(e => e.Mapper = mapper); + return this; + } } \ No newline at end of file diff --git a/src/Transports/Kafka/Wolverine.Kafka/KafkaSubscriberConfiguration.cs b/src/Transports/Kafka/Wolverine.Kafka/KafkaSubscriberConfiguration.cs index b9216a16a..0bdcac789 100644 --- a/src/Transports/Kafka/Wolverine.Kafka/KafkaSubscriberConfiguration.cs +++ b/src/Transports/Kafka/Wolverine.Kafka/KafkaSubscriberConfiguration.cs @@ -8,4 +8,15 @@ internal KafkaSubscriberConfiguration(KafkaTopic endpoint) : base(endpoint) { } + /// + /// Use a custom interoperability strategy to map Wolverine messages to an upstream + /// system's protocol + /// + /// + /// + public KafkaSubscriberConfiguration UseInterop(IKafkaEnvelopeMapper mapper) + { + add(e => e.Mapper = mapper); + return this; + } } \ No newline at end of file diff --git a/src/Transports/MQTT/Wolverine.MQTT/MqttListenerConfiguration.cs b/src/Transports/MQTT/Wolverine.MQTT/MqttListenerConfiguration.cs index 6185a1ec8..e82e86e1c 100644 --- a/src/Transports/MQTT/Wolverine.MQTT/MqttListenerConfiguration.cs +++ b/src/Transports/MQTT/Wolverine.MQTT/MqttListenerConfiguration.cs @@ -34,4 +34,16 @@ public MqttListenerConfiguration QualityOfService(MqttQualityOfServiceLevel serv add(e => e.QualityOfServiceLevel = serviceLevel); return this; } + + /// + /// Use a custom interoperability strategy to map Wolverine messages to an upstream + /// system's protocol + /// + /// + /// + public MqttListenerConfiguration UseInterop(IMqttEnvelopeMapper mapper) + { + add(e => e.EnvelopeMapper = mapper); + return this; + } } \ No newline at end of file diff --git a/src/Transports/MQTT/Wolverine.MQTT/MqttSubscriberConfiguration.cs b/src/Transports/MQTT/Wolverine.MQTT/MqttSubscriberConfiguration.cs index 003f4b3c4..b4b701887 100644 --- a/src/Transports/MQTT/Wolverine.MQTT/MqttSubscriberConfiguration.cs +++ b/src/Transports/MQTT/Wolverine.MQTT/MqttSubscriberConfiguration.cs @@ -30,4 +30,16 @@ public MqttSubscriberConfiguration QualityOfService(MqttQualityOfServiceLevel se add(e => e.QualityOfServiceLevel = serviceLevel); return this; } + + /// + /// Use a custom interoperability strategy to map Wolverine messages to an upstream + /// system's protocol + /// + /// + /// + public MqttSubscriberConfiguration UseInterop(IMqttEnvelopeMapper mapper) + { + add(e => e.EnvelopeMapper = mapper); + return this; + } } \ No newline at end of file