node-red-contrib-kafka-manager icon indicating copy to clipboard operation
node-red-contrib-kafka-manager copied to clipboard

node.error is not having the message as a second attribute

Open wombach opened this issue 1 year ago • 2 comments

Hi,

I like your library, but I am not proficient in JS to do this change myself.

When using the producer an the Kafka cluster is down, then the status of the producer changes and the producer sends log messages, but the related error can not be catched, because the node.error call does only have a single paramater. If you could add then according to this thread https://github.com/node-red/node-red/issues/2887#issuecomment-787107048 , the error becomes catchable.

I solved it now by maintaining a state of the broker taken from the status of the kafka producer and asses with a small delay, whether or not the message has been sent. However, the debug2 in the screenshot never delivers any output. image

I am using version 0.5.1. Here also the example shown in the screenshot flows (8).json.txt I changed the file extension, so I could upload the file.

thanks a lot.

-Andreas

wombach avatar Jun 28 '23 21:06 wombach

will fix as part of major uplift of logic I am doing. Basically reducing number of connections along with synergies of logic on state which should lead to better handling of outlier cases so if state change noticed at various levels automated actions occur on impacted nodes. May be a while before in place as doing in my free time and very busy at the moment.

Plus need to consider impact as if error re-queuing message to try again in trying to resolve issue. Was pondering over providing option to pass thru message in event of failure as alternative to pushing to dead letter q or it's failure. Maybe better answer is just enable catch ability and make dead letter queue optional.

peterprib avatar Jun 29 '23 09:06 peterprib

perfect looking forward to it.

wombach avatar Jun 29 '23 11:06 wombach