Giter Club home page Giter Club logo

Comments (12)

gdlcf88 avatar gdlcf88 commented on July 2, 2024

I added a parameterless constructor, please try again with v0.3.1, thanks.

from notificationservice.

 avatar commented on July 2, 2024

This morning I downloaded the source code locally and added constructors to solve the JSON problem, but I found the following two problems:
image

  1. Subscription messages will fail if you do not inherit ITransientDependency
  2. The constructor I use to pass the message is
new CreateEmailNotificationEto(
                    CurrentTenant.Id,
                    userId,
                    "标题",
                    body)

Without the userId, I wonder if the two constructors have the same number of arguments?

from notificationservice.

gdlcf88 avatar gdlcf88 commented on July 2, 2024

Subscription messages will fail if you do not inherit ITransientDependency

Please check your module dependency.

public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services
.TryAddTransient<IDistributedEventHandler<CreateEmailNotificationEto>,
CreateEmailNotificationEventHandler>();
}

from notificationservice.

 avatar commented on July 2, 2024

I am using the 0.3.1 package directly now, and still can't receive messages. The error message is as follows

---> (Inner Exception #4) Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'EasyAbp.NotificationService.Provider.Mailing.CreateEmailNotificationEventHandler' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Volo.Abp.EventBus.IocEventHandlerFactory.GetHandler()
   at Volo.Abp.EventBus.EventBusBase.TriggerHandlerAsync(IEventHandlerFactory asyncHandlerFactory, Type eventType, Object eventData, List`1 exceptions)
   at Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type eventType, Object eventData, List`1 exceptions)
   at Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type eventType, Object eventData)
   at Volo.Abp.EventBus.Rebus.RebusDistributedEventHandlerAdapter`1.Handle(TEventData message)
   at Rebus.Pipeline.Receive.HandlerInvoker`1.Invoke()
   at Rebus.Pipeline.Receive.DispatchIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
   at Rebus.Sagas.LoadSagaDataStep.Process(IncomingStepContext context, Func`1 next)
   at Rebus.Pipeline.Receive.ActivateHandlersStep.Process(IncomingStepContext context, Func`1 next)
   at Rebus.Pipeline.Receive.HandleRoutingSlipsStep.Process(IncomingStepContext context, Func`1 next)
   at Rebus.Pipeline.Receive.DeserializeIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
   at Rebus.DataBus.ClaimCheck.HydrateIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
   at Rebus.Retry.FailFast.FailFastStep.Process(IncomingStepContext context, Func`1 next)
   at Rebus.Retry.Simple.SimpleRetryStrategyStep.DispatchWithTrackerIdentifier(Func`1 next, String identifierToTrackMessageBy, ITransactionContext transactionContext, String messageId, String secondLevelMessageId)<---

from notificationservice.

gdlcf88 avatar gdlcf88 commented on July 2, 2024

https://docs.abp.io/en/abp/latest/Module-Development-Basics#module-dependencies

from notificationservice.

 avatar commented on July 2, 2024

Sorry, I read the documentation, but I still don't understand why. I knew I needed to introduce modules, so I did:
image

I don't think the TryAddTransient below needs to be added to my module either, but I tried it and it doesn't work either. Thank you for your help

from notificationservice.

gdlcf88 avatar gdlcf88 commented on July 2, 2024

Could you please try this code:

            context.Services.AddTransient<CreateEmailNotificationEventHandler>();

from notificationservice.

 avatar commented on July 2, 2024

Very good. After adding this sentence, emails can be sent normally, and parameters can also be passed normally. I hope it can be added to the document, so that other people will not encounter this problem

from notificationservice.

gdlcf88 avatar gdlcf88 commented on July 2, 2024

Very good. After adding this sentence, emails can be sent normally, and parameters can also be passed normally. I hope it can be added to the document, so that other people will not encounter this problem

4608b6d

from notificationservice.

 avatar commented on July 2, 2024

There is another problem. I didn't mention a new issue. I just wrote it here.
I used SMS to send the notification, but after execution, the database notification table saved the data, but did not save the passed parameters:
image

Send method:

image

from notificationservice.

gdlcf88 avatar gdlcf88 commented on July 2, 2024

There is another problem

Please create a new issue, thank you.

from notificationservice.

 avatar commented on July 2, 2024

There is another problem

Please create a new issue, thank you.

ok It's already created.

from notificationservice.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.