0

I am trying to implement a Hono sender that sends a large amount of data to a Hono instance however I keep running into an issue with the sender running out of credits. Specifically. "cannot send message while waiting for replenishment with credit". How can I trigger the sender to be replenished with credits or wait for more credits to be available before sending the next message?

Keiran Hines
  • 21
  • 1
  • 2
  • Hi, can you update the question with the code. especially, the part where you take care of queue drain handler? – kucing_terbang Sep 18 '18 at 07:39
  • Hi kucing_terbang. At the moment there is know queue drain handler. I was following along to the example under the 0.7 branch and have not seen that implemted. How would you advice I handle this? – Keiran Hines Sep 18 '18 at 07:42
  • Hi kucing_terbang. At the moment there is know queue drain handler. I was following along to the example under the 0.7 branch and have not seen that implemted. How would you advice I handle this? – Keiran Hines Sep 18 '18 at 07:42
  • I see, could you try to trigger the request again? But, try to wait a while before you trigger it. As, probably, the HTTP adapter may not receive credits quickly enough for the request to be served immediately. If it is still happen, I would try it in my local later. – kucing_terbang Sep 18 '18 at 08:19
  • I have added the following code and it still does not appear to work, any help would be appreciated. https://pastebin.com/mZScyiVk @kucing_terbang – Keiran Hines Sep 18 '18 at 09:43

1 Answers1

0

One reason for this may the fact that you do not have a consumer running when sending telemetry data. Hono does handle back-pressure by waiting for a consumer to be capable of receiving messages. However, if there is no consumer currently running, then then your sender will not receive credits as well.

Also see: https://www.eclipse.org/hono/deployment/openshift/#uploading-telemetry-with-http

ctron
  • 538
  • 3
  • 13