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 2019/08/07 13:38:47 UTC

[GitHub] [rocketmq-client-go] pangliang opened a new issue #144: assignment to entry in nil map

pangliang opened a new issue #144: assignment to entry in nil map
URL: https://github.com/apache/rocketmq-client-go/issues/144
 
 
   when set consumer.MessageSelector value, got `assignment to entry in nil map` panic
   
   ```go
   err := c.Subscribe(
   	"TopicTest",
   	consumer.MessageSelector{Type: consumer.TAG, Expression: "tag1"},
   	func(ctx context.Context, msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) {
   	fmt.Printf("subscribe callback: %v \n", msgs)
   	return consumer.ConsumeSuccess, nil
   })
   ```
   ```
   panic: assignment to entry in nil map
   
   goroutine 1 [running]:
   github.com/apache/rocketmq-client-go/consumer.buildSubscriptionData(0x667d8b, 0x9, 0x666f7f, 0x3, 0x667194, 0x4, 0x0)
   	/home/wei.liang/go/src/github.com/apache/rocketmq-client-go/consumer/consumer.go:929 +0x496
   github.com/apache/rocketmq-client-go/consumer.(*pushConsumer).Subscribe(0xc000120640, 0x667d8b, 0x9, 0x666f7f, 0x3, 0x667194, 0x4, 0x672c50, 0x0, 0x0)
   	/home/wei.liang/go/src/github.com/apache/rocketmq-client-go/consumer/push_consumer.go:165 +0xf7
   main.main()
   	/home/wei.liang/go/src/github.com/apache/rocketmq-client-go/examples/consumer/simple/main.go:36 +0x247
   
   Debugger finished with exit code 0
   ```
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services