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 2020/05/11 11:34:36 UTC

[GitHub] [rocketmq-client-go] kitestar opened a new issue #484: [Native] consumer TAG selector 无效

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


   根据示例代码
   `selector := consumer.MessageSelector{
   		Type:       consumer.TAG,
   		Expression: "TagA || TagC",
   	}
   	err := c.Subscribe("TopicTest", selector, func(ctx context.Context,
   		msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) {
   		fmt.Printf("subscribe callback: %v \n", msgs)
   		return consumer.ConsumeSuccess, nil
   	})
   	`
   设置TAG过滤条件不起作用
   消费的时候对selector 有 条件校验 `if data.Tags.Len() > 0 && data.ClassFilterMode {`
   但是没有代码设置ClassFilterMode为true


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



[GitHub] [rocketmq-client-go] storezhang edited a comment on issue #484: [Native] usage of consumer TAG selector.

Posted by GitBox <gi...@apache.org>.
storezhang edited a comment on issue #484:
URL: https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-715879921


   > classFilterMode是使用过滤器类过滤的和tag过滤属于并列的关系,示例代码我这边是可以过滤的,你可以看下java版的rocketmq
   
   2.1.0-rc5,tag过滤无效(在阿里云上)


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



[GitHub] [rocketmq-client-go] storezhang commented on issue #484: [Native] usage of consumer TAG selector.

Posted by GitBox <gi...@apache.org>.
storezhang commented on issue #484:
URL: https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-715879921


   > classFilterMode是使用过滤器类过滤的和tag过滤属于并列的关系,示例代码我这边是可以过滤的,你可以看下java版的rocketmq
   
   2.1.0-rc5,tag过滤无效


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



[GitHub] [rocketmq-client-go] covered edited a comment on issue #484: [Native] usage of consumer TAG selector.

Posted by GitBox <gi...@apache.org>.
covered edited a comment on issue #484:
URL: https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-828361187


   tag:
   xxx*
   xxx||s*
   *||xxx
   xxx* || *
   以上形式测试也不起作用


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



[GitHub] [rocketmq-client-go] storezhang commented on issue #484: [Native] usage of consumer TAG selector.

Posted by GitBox <gi...@apache.org>.
storezhang commented on issue #484:
URL: https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-723374344


   > 后来没测试 自己改了 手动改源码 data.ClassFilterMode=true 或者外部再对消息根据tag 过滤一遍 张川 <no...@github.com> 于2020年10月24日周六 下午4:23写道:
   > […](#)
   > 根据示例代码 selector := consumer.MessageSelector{ Type: consumer.TAG, Expression: "TagA || TagC", } err := c.Subscribe("TopicTest", selector, func(ctx context.Context, msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) { fmt.Printf("subscribe callback: %v \n", msgs) return consumer.ConsumeSuccess, nil }) 设置TAG过滤条件不起作用 消费的时候对selector 有 条件校验 if data.Tags.Len() > 0 && data.ClassFilterMode { 但是没有代码设置ClassFilterMode为true 你解决了吗?我也是tag过滤无效(在阿里云上) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <[#484 (comment)](https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-715879984)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA7OXZNS5DWE3M3B25T23R3SMKFGNANCNFSM4M52QHPA> .
   
   后面问了一下@skyitachi,将不同的tag改成不同的group,问题解决,不过感觉这样解决不是很好,还是得官方解决这个问题更好


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



[GitHub] [rocketmq-client-go] covered commented on issue #484: [Native] usage of consumer TAG selector.

Posted by GitBox <gi...@apache.org>.
covered commented on issue #484:
URL: https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-828361187


   tag:
   xxx*
   xxx||s*
   *||xxx
   * || xxx*
   以上形式测试也不起作用


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



[GitHub] [rocketmq-client-go] covered edited a comment on issue #484: [Native] usage of consumer TAG selector.

Posted by GitBox <gi...@apache.org>.
covered edited a comment on issue #484:
URL: https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-828361187


   tag:
   xxx*
   xxx||s*
   *||xxx
   xxx* || *
   以上形式测试也不起作用
   
   tag:
   abc||def
   这个形式可以。


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



[GitHub] [rocketmq-client-go] storezhang commented on issue #484: [Native] usage of consumer TAG selector.

Posted by GitBox <gi...@apache.org>.
storezhang commented on issue #484:
URL: https://github.com/apache/rocketmq-client-go/issues/484#issuecomment-715879984


   > 根据示例代码
   > `selector := consumer.MessageSelector{ Type: consumer.TAG, Expression: "TagA || TagC", } err := c.Subscribe("TopicTest", selector, func(ctx context.Context, msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) { fmt.Printf("subscribe callback: %v \n", msgs) return consumer.ConsumeSuccess, nil }) `
   > 设置TAG过滤条件不起作用
   > 消费的时候对selector 有 条件校验 `if data.Tags.Len() > 0 && data.ClassFilterMode {`
   > 但是没有代码设置ClassFilterMode为true
   
   你解决了吗?我也是tag过滤无效(在阿里云上)


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