Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch invalid credentials #877

Closed
jackedelic opened this issue Aug 1, 2022 · 3 comments
Closed

Catch invalid credentials #877

jackedelic opened this issue Aug 1, 2022 · 3 comments
Labels
question Further information is requested

Comments

@jackedelic
Copy link
Contributor

Hi, I am using this sdk in my company where one of our products/services is help customers/users create a consumer and subscribe to topics given by them. There's one case where user provides invalid credentials. We have yet to figure out how to handle this "invalid credentials" case. What is the best way to catch this type of error? Is there a way to catch this upon Initializing PushConsumer? We observe this results in "send heartbeat to broker fails" error during consumption, which seems pretty generic and I believe is not necessarily specific to invalid AkSk.

Any help or guidance is very much appreciated :D

  1. Please describe the issue you observed:

    • What did you do (The steps to reproduce)?
      Create a new Push Consumer with invalid aksk credentials and subscribe to a topic.

    • What did you expect to see?
      Error thrown out about invalid aksk credentials either upon initialization of Push Consumer or during message consumption.

    • What did you see instead?
      log output during consumption:
      WARN[0001] send heart beat to broker failed brokerAddr="10.249.160.212:30911" brokerId=0 brokerName=brk-0b82304e-12ad3b0cd86c-6ef1d447009 responseCode=1

  2. Please tell us about your environment:

    • What is your OS?
      macOS Monterey version 12.4

    • What is your client version?
      github.com/apache/rocketmq-client-go/v2 v2.1.0

@ShannonDing ShannonDing added the question Further information is requested label Aug 3, 2022
@ShannonDing
Copy link
Member

The startup of PushConsumer is actually a lazy startup. It would not directly verify the validity of authentication and cannot support your requirements at the moment. The ak/sk is a private permission set by the user, it is recommend that you ensure the correctness of the parameters before use it.

@ShannonDing
Copy link
Member

by the way, welcome to taking a minute to feedback on your usage scenario following #423 .

@jackedelic
Copy link
Contributor Author

Thank you Shannon for the useful reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants