Hi Hamze, I hope it’s ok for me to bring the discussion back to the list?
Sure, I and the others are always happy to help. This way I’m even happy I responded so late … there’s nothing better than people scratiching their own itches ;-) I guess the best way for us to collaborate on this, would be if you created a Pull-Request with your changes and then we can have a look. Tell me, if you need any help with that. Chris Von: Hamze HAMZE <hamze.ha...@valeo.com> Datum: Dienstag, 22. August 2023 um 13:03 An: Christofer Dutz <christofer.d...@c-ware.de> Betreff: Re: subscription mode with apache-kafka Hello Mr. Dutz, I appreciate your response! As time went by, I started to develop it myself to support both mods. Currently I am still debugging. I am trying really hard because I am originally a Python developer and not comfortable with Java. I would be happy to share it with you & the development team as soon as there is a solution! If you would like, we can have a little meeting about it. Thank you for your time! Regards Am Di., 22. Aug. 2023 um 12:48 Uhr schrieb Christofer Dutz <christofer.d...@c-ware.de<mailto:christofer.d...@c-ware.de>>: Just noticed I marked this email for followup in my holidays, but never did … sorry for that. I would really love to change everything to full subscription mode only and to make every driver able to either directly provide subscriptions, or to emulate them by polling in the background. Unfortunately, I haven’t found the time yet to implement such a feature. Also, would I love to build a new scraper (sort of core to most integration modules we have) to allow both polling and subscribing … also with more complex scenarios like “polling with a subscription trigger”. In this case a subscription would be done for the trigger alone and once that value changes, the scraper fetches a chunk of data using polling. So, for now, having some way to support both would be very good. Chris Von: Hamze HAMZE <hamze.ha...@valeo.com<mailto:hamze.ha...@valeo.com>> Datum: Donnerstag, 10. August 2023 um 10:33 An: dev@plc4x.apache.org<mailto:dev@plc4x.apache.org> <dev@plc4x.apache.org<mailto:dev@plc4x.apache.org>> Betreff: subscription mode with apache-kafka Dear Developers, I am trying to realize a use case where you can poll data from the plc at change of value. I have already seen some examples at code level but I am not a java developer and therefore I have faced some issues with the integration of the subscription mode. i have cloned the git repository and modified [ https://github.com/apache/plc4x/blob/develop/plc4j/integrations/apache-kafka/src/main/java/org/apache/plc4x/kafka/Plc4xSourceTask.java ] locally. I would like to be able to switch in between interval polling and subscription mode, set in the configuration file. So that you can set in the configuration the PLC value to monitor and onchange it polls data. That is also why i have set in Constants.java these lies [ https://github.com/apache/plc4x/blob/develop/plc4j/integrations/apache-kafka/src/main/java/org/apache/plc4x/kafka/config/Constants.java ] public static final String KAFKA_SUBSCRIPTION_VALUE = "subscription"; public static final String KAFKA_SUBSCRIPTION_DOC = "PLC4X Subscriptionvalue"; There is also one approach i have found but couldn't adapt the algorithm correctly to my use case. https://plc4x.apache.org/users/getting-started/plc4j.html Maybe someone has had any same issues before or has already developed the PLC4xSourceTask.java? [ https://github.com/apache/plc4x/blob/develop/plc4j/integrations/apache-kafka/src/main/java/org/apache/plc4x/kafka/Plc4xSourceTask.java ] Thank you in Advance! Regards -- *Hamze HAMZE* Trainee/Apprentice/VIE +49 (0) 90926032877 hamze.ha...@valeo.com<mailto:hamze.ha...@valeo.com> Valeo Schalter und Sensoren GmbH Valeostrasse 1 - 86650 - Wemding (GERMANY) [image: valeo] <https://valeo.com/> [image: linkedin] <https://linkedin.com/company/valeo> [image: twitter] <https://twitter.com/valeo_group> [image: youtube] <https://youtube.com/user/ValeoGroup> [image: facebook] <https://facebook.com/Valeo.Group/> [image: instagram] <https://instagram.com/valeo_group> Sitz der Gesellschaft: 74321 Bietigheim-Bissingen Handelsregister: Amtsgericht Stuttgart - HRB 301795 Vorsitzender des Aufsichtsrates: Dr. Andreas Heinrich Geschäftsführer: Stiv Michael Smudja, Martin Mandry, Pierre-Yves Veltois *This e-mail message is intended for the internal use of the intended recipient(s) only. The information contained herein is confidential/privileged. Its disclosure or reproduction is strictly prohibited. If you are not the intended recipient, please inform the sender immediately, do not disclose it internally or to third parties and destroy it. In the course of our business relationship and for business purposes only, Valeo may need to process some of your personal data. For more information, please refer to the Valeo Data Protection Statement and Privacy notice available on Valeo.com <https://www.valeo.com/en/ethics-and-compliance/#principes>* -- *This e-mail message is intended for the internal use of the intended recipient(s) only. The information contained herein is confidential/privileged. Its disclosure or reproduction is strictly prohibited. If you are not the intended recipient, please inform the sender immediately, do not disclose it internally or to third parties and destroy it. In the course of our business relationship and for business purposes only, Valeo may need to process some of your personal data. For more information, please refer to the Valeo Data Protection Statement and Privacy notice available on Valeo.com <https://www.valeo.com/en/ethics-and-compliance/#principes>* -- Hamze HAMZE Trainee/Apprentice/VIE +49 (0) 90926032877 hamze.ha...@valeo.com<mailto:hamze.ha...@valeo.com> Valeo Schalter und Sensoren GmbH Valeostrasse 1 - 86650 - Wemding (GERMANY) [Das Bild wurde vom Absender entfernt. valeo]<https://valeo.com/> [Das Bild wurde vom Absender entfernt. linkedin]<https://linkedin.com/company/valeo> [Das Bild wurde vom Absender entfernt. twitter]<https://twitter.com/valeo_group> [Das Bild wurde vom Absender entfernt. youtube]<https://youtube.com/user/ValeoGroup> [Das Bild wurde vom Absender entfernt. facebook]<https://facebook.com/Valeo.Group/> [Das Bild wurde vom Absender entfernt. instagram]<https://instagram.com/valeo_group> Sitz der Gesellschaft: 74321 Bietigheim-Bissingen Handelsregister: Amtsgericht Stuttgart - HRB 301795 Vorsitzender des Aufsichtsrates: Dr. Andreas Heinrich Geschäftsführer: Stiv Michael Smudja, Martin Mandry, Pierre-Yves Veltois This e-mail message is intended for the internal use of the intended recipient(s) only. The information contained herein is confidential/privileged. Its disclosure or reproduction is strictly prohibited. If you are not the intended recipient, please inform the sender immediately, do not disclose it internally or to third parties and destroy it. In the course of our business relationship and for business purposes only, Valeo may need to process some of your personal data. For more information, please refer to the Valeo Data Protection Statement and Privacy notice available on Valeo.com<https://www.valeo.com/en/ethics-and-compliance/#principes> This e-mail message is intended for the internal use of the intended recipient(s) only. The information contained herein is confidential/privileged. Its disclosure or reproduction is strictly prohibited. If you are not the intended recipient, please inform the sender immediately, do not disclose it internally or to third parties and destroy it. In the course of our business relationship and for business purposes only, Valeo may need to process some of your personal data. For more information, please refer to the Valeo Data Protection Statement and Privacy notice available on Valeo.com<https://www.valeo.com/en/ethics-and-compliance/#principes>