You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to log activity in the Consumer Global Events. OnConsumeStarted, the following works:
using (var scope = context.DependencyResolver.CreateScope())
{
//Do work here
}
The same code in OnConsumeCompleted throws an error message:
System.AggregateException: One or more errors occurred. (Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.)
2024-08-04 11:19:07 ---> System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to log activity in the Consumer Global Events. OnConsumeStarted, the following works:
using (var scope = context.DependencyResolver.CreateScope())
{
//Do work here
}
The same code in OnConsumeCompleted throws an error message:
System.AggregateException: One or more errors occurred. (Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.)
2024-08-04 11:19:07 ---> System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions