# Decode Sparkplug messages before sending to Azure Event Hub

**URL:** <https://community.hivemq.com/t/decode-sparkplug-messages-before-sending-to-azure-event-hub/1456>\
**Category:** HiveMQ Commercial Offerings\
**Created:** [September 21, 2022, 1:46pm UTC](https://community.hivemq.com/t/decode-sparkplug-messages-before-sending-to-azure-event-hub/1456 "2022-09-21T13:46:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frosty](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@Frosty](https://community.hivemq.com/u/Frosty)\
**Post date:** [September 21, 2022, 1:46pm UTC](https://community.hivemq.com/t/decode-sparkplug-messages-before-sending-to-azure-event-hub/1456/1 "2022-09-21T13:46:29Z")

</div>

Hi,

I’m in the situation where we have Sparkplug enabled edge devices communicating over MQTT. This works perfectly with HiveMQ.

Right now we would like to forward all MQTT messages to Azure Event Hub for further processing in Azure Databricks. Ideally the Sparkplug messages (which are protobuf encoded) would be decoded into plain text/json before getting sent to the Event Hub.

So far I’ve discovered:

- How to forward MQTT message to Azure Event Hubs using its Kafka endpoint:  
[https://www.hivemq.com/blog/connect-hivemq-and-azure-event-hubs/?utm\_source=web&utm\_medium=AzureWebinar&utm\_campaign=Webinar+Promotion](https://www.hivemq.com/blog/connect-hivemq-and-azure-event-hubs/?utm_source=web&utm_medium=AzureWebinar&utm_campaign=Webinar+Promotion)  
This would result in the encoded messages getting published on the event hub.

- An extension to sent Sparkplug metrics to InfluxDB:  
[https://www.hivemq.com/extension/sparkplug-influxdb-extension/](https://www.hivemq.com/extension/sparkplug-influxdb-extension/)  
We do not use InfluxDB.

So unfortunately these do not cover my use case. Are there any options in the HiveMQ ecosystem to do this? Or am I forced to write my own Sparkplug enabled client to decode and forward all messages to Azure Event Hub?

Thank you in advance for any help.

---

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [September 21, 2022, 1:51pm UTC](https://community.hivemq.com/t/decode-sparkplug-messages-before-sending-to-azure-event-hub/1456/2 "2022-09-21T13:51:08Z")

</div>

Hi @Frosty,

Nice to see your interest in MQTT, HiveMQ and Sparkplug.  
The HiveMQ Kafka Extension comes with a [Customization SDK](https://www.hivemq.com/docs/kafka/4.8/enterprise-extension-for-kafka/kafka-customization.html#mqtt-to-kafka-transformer), which can be leveraged for what you are trying to achieve.  
I suggest you reach out to our colleagues at [sales@hivemq.com](mailto:sales@hivemq.com) and schedule a meeting to dive deeper into your specific requirements.

Best,  
Florian from the HiveMQ Team.

---

<div class="post-metadata">

**Author:** ![Frosty](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@Frosty](https://community.hivemq.com/u/Frosty)\
**Post date:** [September 21, 2022, 2:09pm UTC](https://community.hivemq.com/t/decode-sparkplug-messages-before-sending-to-azure-event-hub/1456/3 "2022-09-21T14:09:06Z")

</div>

Hi Florian,

Thank you for the great and quick reply. Adding a custom transformer in the Kafka extension could be a good solution.

Are all extensions and customizations also available in HiveMQ Cloud?
