flowchartsman edited a comment on issue #8769:
URL: https://github.com/apache/pulsar/issues/8769#issuecomment-736733486


   The issue appears to be a mismatch between `inputMessage.Topic()` and the 
consumers in `gi.consumers`:
   
   If `ackInputMessage` is instrumented like so
   ```go
   // ackInputMessage doesn't produce any result, or the user doesn't want the 
result.
   func (gi *goInstance) ackInputMessage(inputMessage pulsar.Message) {
        log.Infof("**********\ntopic is: %s\nconsumers:\n%#v", 
inputMessage.Topic(), gi.consumers)
        gi.consumers[inputMessage.Topic()].Ack(inputMessage)
   }
   ```
   In the logs we see:
   
   ```
   2020/12/01 18:17:31.048 log.go:46: [info] **********
   topic is: persistent://public/default/test
   consumers:
   
map[string]pulsar.Consumer{"public/default/test":(*pulsar.consumer)(0xc00040cd80)}
   
   ```
   I am unsure whether the failure here is with pulsar-admin or with my use of 
an abbreviated topic, but in any case a panic is not helpful, so I would think 
the right solution would be for pulsar-admin or the API itself to either give 
me an error or take care of the mapping (with an informative message) so that 
this state cannot occur.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to