You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/10/14 02:35:29 UTC

[GitHub] [rocketmq-client-go] syncwt opened a new issue #730: Send msg failed when broker server restart, cause message lost

syncwt opened a new issue #730:
URL: https://github.com/apache/rocketmq-client-go/issues/730


   The issue tracker is **ONLY** used for the go client (feature request of RocketMQ need to follow [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal)). Keep in mind, please check whether there is an existing same report before your raise a new one.
   
   Alternately (especially if your communication is not a bug report), you can send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
   
   Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as to the following:
   
   **BUG REPORT**  
   **Please add the branch name [Native]/[Master] at the header of the Isssue title.**
   
   1. Please describe the issue you observed:
   
       - What did you do (The steps to reproduce)?
   My RMQ cluster is deploy by N master and N slave. When I restart one broker master node, I receive error msg from send msg func with ‘dial tcp xxx.xxx.xxx.xxx:10911: connect: connection refused'
   
       - What did you expect to see?
   When I shutdown the broker node A , the nameSever should find it and update topic  ‘publishInfo’ in the producer client.
   And then client should not select the offline broker node A, send message to another alive broker node B.
   
       - What did you see instead?
    I am confused about when to updating topic's 'pulishInfo' cache in the Go client.
   Maybe when client receive the err msg with dial refused error code , client should update topic publish info active.
   Such as SendSync func at producer.go
   ```go
   func (p *defaultProducer) sendSync(ctx context.Context, msg *primitive.Message, resp *primitive.SendResult) error {
   
   	// ... ignore
   	for retryCount := 0; retryCount < retryTime; retryCount++ {
   		mq := p.selectMessageQueue(msg)
   		
                    // ... ignore
   		res, _err := p.client.InvokeSync(ctx, addr, p.buildSendRequest(mq, msg), 3*time.Second)
   		if _err != nil {
                            //  ***check the error code to judge whether update topic publish info***
   			err = _err
   			continue
   		}
   		return p.client.ProcessSendResponse(mq.BrokerName, res, resp, msg)
   	}
   	return err
   }
   ``` 
   
   2. Please tell us about your environment:
   
        - What is your OS?
   Centos7 for RMQ server and Go Client Server
    
   
        - What is your client version?
   May be v2.1.0-rc4 and the git commit hash is 80b3acc5580a9a512597b94a734feeee3001883a
   
        - What is your RocketMQ version?
    v 4.8.0
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   2. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
   
   4. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:
   
       - [sub-task1-issue-number](example_sub_issue1_link_here): sub-task1 description here, 
       - [sub-task2-issue-number](example_sub_issue2_link_here): sub-task2 description here,
       - ...
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org