NServicebus - One endpoint multiple handlers threading

后端 未结 2 1046
后悔当初
后悔当初 2021-01-23 02:45

I have two endpoints.

Endpoint 1:

  • HandlerForMessage X
  • HandlerForMessage Y
  • HandlerForMessage Z

Web endpoint: - No handler

2条回答
  •  终归单人心
    2021-01-23 03:30

    If I'm getting your scenario correctly, this is a single transaction/ unit of work...

    All of the messages are invoked by the web endpoint sending a message to the endpoint, and all the subsequent messages are dispatched from that handler... so even though the endpoint can be multi threaded, they are all serialised in the same transaction, so if i'm not wrong they are are going to be sequential...

    If you don't want to run multiple endpoints, take a look at this issue describing running multiple endpoints in the same process: https://github.com/Particular/NServiceBus/issues/1357

    Does this help?

提交回复
热议问题