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

Provide support for multi-staged message processing #25

Open
tomkerkhove opened this issue Dec 4, 2019 · 8 comments
Open

Provide support for multi-staged message processing #25

tomkerkhove opened this issue Dec 4, 2019 · 8 comments
Labels
area:message-processing All issues related to how we process the messages integration:service-bus All issues concerning integration with Azure Service Bus specs-required All issues where the specifications are still being defined and implementation should be halted
Projects
Milestone

Comments

@tomkerkhove
Copy link
Contributor

Provide support for multi-staged message processing.

An example of where this is useful is when one process needs to:

  • Persist an order in DB
  • Track AI event
  • Send email communication
  • Send webhook

Every step is a small piece of code doing one thing after which it will be considered "done". Every step that is done will be flagged as completed and should not be re-executed.

The messaging infrastructure should:

  1. Dequeue messages
  2. Check if the context contains a previously successfully executed state
  3. Skip all the executed steps and only process what remains.
  4. Abandon the message and stamp it with last succesfully processed state

Important: Not all ours sources will support this and will only be Azure Service Bus at first sight.

@tomkerkhove tomkerkhove added specs-required All issues where the specifications are still being defined and implementation should be halted integration:service-bus All issues concerning integration with Azure Service Bus labels Dec 4, 2019
@tomkerkhove tomkerkhove added this to To do in Roadmap via automation Dec 4, 2019
@tomkerkhove tomkerkhove added the area:message-processing All issues related to how we process the messages label Dec 4, 2019
@tomkerkhove
Copy link
Contributor Author

I've written this before and can take this up/advise

@stijnmoreels
Copy link
Member

This will maybe made easier once we introduced the message handlers.

@tomkerkhove
Copy link
Contributor Author

Yes and no, yes because every stage will have a handler but the pump should orchestrate thing, but not a prio for now.

@tomkerkhove tomkerkhove added this to the v0.3.0 milestone Jul 10, 2020
@tomkerkhove tomkerkhove modified the milestones: v0.3.0, v0.4.0 Sep 18, 2020
@tomkerkhove tomkerkhove modified the milestones: v0.4.0, v0.5.0 Sep 28, 2020
@tomkerkhove tomkerkhove modified the milestones: v0.5.0, v0.6.0 Oct 16, 2020
@tomkerkhove tomkerkhove modified the milestones: v0.6.0, v0.7.0 Oct 27, 2020
@stijnmoreels
Copy link
Member

Like we talked about offline.
What if we used the context filtering of the message handling to determine which step to use, and provide in the specific Azure Service Bus message handler a Service Bus MessageSender which can be used to send the message back on the queue/topic (with a different message context so the next message handler will be executed)?

@stijnmoreels
Copy link
Member

Hmm, we may want to hold on with this so we can first migrate to the Azure.Identity and therefore the new Azure.Messaging.ServiceBus package. That would mean that we can use the ServiceBusSender instead of the MessageSender in the specific Azure Service Bus message handlers.

@stijnmoreels
Copy link
Member

Hmm, with the current setup, you could already to that yourself (a bit), as the router is registered in the dependency injection container, you could retrieve it in your custom message handler, change the messaging context, and send the received message again through the message router.

@tomkerkhove
Copy link
Contributor Author

Yes but it should be simpler, but I'll provide some more examples later on

@stijnmoreels stijnmoreels modified the milestones: v1.1.0, v1.2.0 Feb 9, 2022
@stijnmoreels stijnmoreels modified the milestones: v1.2.0, v1.3.0 Mar 31, 2022
@stijnmoreels stijnmoreels modified the milestones: v1.3.0, v1.4.0 Sep 12, 2022
@stijnmoreels
Copy link
Member

The message router needs to have a ServiceBusSender instance, so it may be good to have this injected, and for that, we may want to use the injected stuff for the entire message pump (see #34) in v2.

@stijnmoreels stijnmoreels modified the milestones: v2.0.0, v2.1.0 Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:message-processing All issues related to how we process the messages integration:service-bus All issues concerning integration with Azure Service Bus specs-required All issues where the specifications are still being defined and implementation should be halted
Projects
Roadmap
  
To do
Development

No branches or pull requests

2 participants