peterprib / node-red-contrib-kafka-manager

Implement
GNU General Public License v3.0
22 stars 12 forks source link

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

Open wombach opened 1 year ago

wombach commented 1 year ago

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

peterprib commented 1 year ago

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.

wombach commented 1 year ago

perfect looking forward to it.