Hi Guys,
I am using below configuration for the Kafka Message listener , if any error occurs then it is trying to reprocess the same message and while reading Redelivery-policy getting "Could not serialize object" when I deploy application into RTF(AWS Cloud) and its going to infinite loop. Working as expected in my local , when I deploy to RTF issue persists.
NOTE: Application is Working as Expected in my local , issue is only while deploying to RTF environment .In RTF it is going to infinite loop as redelivery not working as Expected.
Kafka Message listener Configuration:
<kafka:message-listener doc:name="Message listener" doc:id="d774bb4d-1483-4994-bd3a-ec56622a0c93" config-ref="Apache_Kafka_Consumer_configuration" pollTimeout="1000" pollTimeoutTimeUnit="SECONDS" ackMode="MANUAL" parallelConsumersAmount="5">
<redelivery-policy maxRedeliveryCount="3" useSecureHash="true"/>
</kafka:message-listener>
Error :
********************************************************************************
Message : Could not serialize object
Element : Kafka-listerner:\configurations\deliveryPreferences:application\json:ics-configuration-api-config/source/0 @ ics-configurations-process:ics-configurations-prc-api.xml:12
Element DSL : <redelivery-policy maxRedeliveryCount="${Kafka.redeliveryCount}"></redelivery-policy>
Error type : MULE:UNKNOWN
FlowStack : at Kafka-listerner:\configurations\deliveryPreferences:application\json:ics-configuration-api-config(Kafka-listerner:\configurations\deliveryPreferences:application\json:ics-configuration-api-config/processors/2 @ ics-configurations-process:ics-configurations-prc-api.xml:58 (Parallel For Each))
--------------------------------------------------------------------------------
Root Exception stack trace:
java.io.NotSerializableException: org.mule.runtime.core.privileged.routing.RoutingResult
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at java.util.LinkedList.writeObject(LinkedList.java:1131)
at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
My flow will look like this:
Please help me out , Let me know if any one faced similar issue .
I see two different configurations for "redeliveryCount".
In Studio, it seems you set it like this:
redelivery-policy maxRedeliveryCount="3"
But the error in RTF displays this:
redelivery-policy maxRedeliveryCount="${Kafka.redeliveryCount}"So, are you supposed to pass the property "Kafka.redeliveryCount" as part of command-line argument during deployment and you are not passing it?
-gopal