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

在MQ消费者中调用dubbo接口如何传递用户id? #729

Open
qzztf opened this issue Jan 17, 2025 · 0 comments
Open

在MQ消费者中调用dubbo接口如何传递用户id? #729

qzztf opened this issue Jan 17, 2025 · 0 comments

Comments

@qzztf
Copy link

qzztf commented Jan 17, 2025

对以下问题有疑问:

我现在有个MQ消费者,需要调用其他服务的dubbo接口,要将消息中的用户id传过去,这个服务会使用mybatis plus的自动填充功能设置该用户id为创建人。

我现在尝试在调用dubbo接口之前,先用这个用户id登录一次,生成一个token, 这个token可以传到dubbo服务提供者了,但是调用完成之后,我还需要使用该token,发送这个token已经获取不到了。貌似是因为RpcContext已经是一个新的了。

< 备注:请尽量详细描述问题所在 >

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

No branches or pull requests

1 participant