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

Execute ReConsume exception from dashboard #674

Closed
alvin-su opened this issue Sep 24, 2020 · 5 comments
Closed

Execute ReConsume exception from dashboard #674

alvin-su opened this issue Sep 24, 2020 · 5 comments

Comments

@alvin-su
Copy link

DotNetCore.CAP.DefaultSubscriberExecutor[0] An exception occurred while executing the subscription method. Topic:inno.capBus.Adv, Id:1309078057219731456 DotNetCore.CAP.SubscriberNotFoundException: Message can not be found subscriber. name:inno.capBus.Adv, group:cap.queue.capconsumer.v1, content:{"Id":"5f6c75913614c21ae00bc79f","Timestamp":"2020-09-24T18:31:45.2543145+08:00","Content":"{"Id":1,"IsEnable":0,"Name":"测试","Remark":null,"ParentModelId":null}","CallbackName":null} see: #63 at DotNetCore.CAP.DefaultSubscriberExecutor.InvokeConsumerMethodAsync(CapReceivedMessage receivedMessage, CancellationToken cancellationToken) in C:\projects\cap\src\DotNetCore.CAP\ISubscribeExecutor.Default.cs:line 177 at DotNetCore.CAP.DefaultSubscriberExecutor.ExecuteWithoutRetryAsync(CapReceivedMessage message, CancellationToken cancellationToken) in C:\projects\cap\src\DotNetCore.CAP\ISubscribeExecutor.Default.cs:line 93

@yang-xiaodong
Copy link
Member

refer to #63

@alvin-su
Copy link
Author

我发送端是一个实例,订阅端是一个实例,都指向了一个数据库,是这个问题造成的吗?

@yang-xiaodong
Copy link
Member

Yes, Refer FAQ to learn "How to use the same database for different applications?"

@yang-xiaodong yang-xiaodong changed the title 在Dashbord 中 点击重新消费-报错 Execute ReConsume exception from dashboard Sep 24, 2020
@alvin-su
Copy link
Author

放在同一个实例中还是不行,报相同的错误,发送端代码:
public async Task Privacy()
{
await _capBus.PublishAsync("inno.capBus.Adv", new W_Model()
{
Id = 1,
Name = "测试"
});
return View();
}
订阅端代码:
[NonAction]
[CapSubscribe("inno.capBus.Adv")]
public void ReceiveMessage(W_Model p)
{
Console.WriteLine($"message is:{p.Name}");
}

@alvin-su
Copy link
Author

解决了,我是用的EF 连接的数据库,两个实例连接同一个数据库,只要把订阅端程序,指定一下DefaultGroup 为发送端的名称就可以了。

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

2 participants