dapr icon indicating copy to clipboard operation
dapr copied to clipboard

Feature Request: Extend the Pub/Sub API with delayed event scheduling

Open mmisztal1980 opened this issue 4 years ago • 13 comments

In what area(s)?

/area runtime

Describe the feature

At this moment the Dapr pubsub's event publishing API supports publishing only, please consider extending this API with delayed event scheduling.

A user should be able to messages to a pubsub for delayed processing. Examples:

  • Scheduling a job to become available for processing by a system at a certain time.
  • Scheduling reminders/notifications
  • Improving resiliency by introducing exponential backoff after a service fails to process an event, while guaranteeing that the message is persisted by the pubsub backend

Requirements

  • This capability realizes a pubsub that supports a reliable distributed time-based scheduler, and the some of the pubsub backends support it already (there might be more, I'm not familiar with all supported backends):
  • When attempting to schedule an event on to an unsupported pubsub backend an exception should be thrown
  • Scheduled events should not be received by the subscribers until the defined enqueue time. Before that time, scheduled events should be cancellable. Cancellation should delete the event from the pubsub backend.

Release Note

RELEASE NOTE: N/A

mmisztal1980 avatar Jan 17 '21 21:01 mmisztal1980

How about creating a service that has a queue to publish to pubsub on a schedule that treat as state? This way can support the functionality for all pubsubs. And how about implement using virtual actor?

mrchypark avatar Jan 18 '21 18:01 mrchypark

This feature can be implemented using metadata when message is published and the scheduling information passed through to the component. A draft PR with this idea, or something else can be a good starter to evaluate how to address this.

There are other solutions too, like @mrchypark but Dapr can expose additional capabilities via metadata.

artursouza avatar Mar 02 '21 07:03 artursouza

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 24 '21 17:06 github-actions[bot]

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.

dapr-bot avatar Jul 01 '21 17:07 dapr-bot

How about creating a service that has a queue to publish to pubsub on a schedule that treat as state? This way can support the functionality for all pubsubs. And how about implement using virtual actor?

Azure Service Bus supports this feature out-of-the-box, no need to invent a wheel, just a way to use ASB scheduling via dapr call...

Shiko1st avatar Jan 06 '22 11:01 Shiko1st

That's useful

geekgao avatar Jan 14 '22 05:01 geekgao

It's an important feature and already is supported by Azure Service Bus.

itsoli91 avatar Feb 22 '22 13:02 itsoli91

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot avatar Apr 23 '22 15:04 dapr-bot

Seems nobody cares...

Shiko1st avatar Apr 23 '22 17:04 Shiko1st

Seems nobody cares...

Oh, folks care. Just 2 days ago I spoke with several end users who are very interested in this. I'll see if we can triage to 1.8 or 1.9.

yaron2 avatar Apr 23 '22 17:04 yaron2

any update?

calvin2021y avatar May 31 '22 12:05 calvin2021y

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot avatar Jul 30 '22 12:07 dapr-bot

@yaron2 any news?

Shiko1st avatar Jul 30 '22 13:07 Shiko1st

waiting for progress.

eyeye avatar Aug 12 '22 06:08 eyeye

This will be very useful feature.

abhijeethaval avatar Aug 23 '22 12:08 abhijeethaval

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot avatar Oct 22 '22 12:10 dapr-bot

no point in keeping this open

mmisztal1980 avatar Oct 23 '22 10:10 mmisztal1980

We are still interested in this feature. From our point of view, there is still a reason to keep it open! ;-)

DataWorm avatar Oct 23 '22 10:10 DataWorm

Yes, we are, but seems nobody cares )))

Shiko1st avatar Oct 23 '22 11:10 Shiko1st

no point in keeping this open

Is this feature now available?

Shiko1st avatar Oct 23 '22 11:10 Shiko1st

Triaged into 1.10. I believe this should be doable. If anyone from the community interested in this feature wants to take the lead and help with design and implementation, that would greatly help.

yaron2 avatar Oct 23 '22 16:10 yaron2

Hi all, this feature is now at the proposal stage here: https://github.com/dapr/proposals/pull/12.

yaron2 avatar Nov 23 '22 17:11 yaron2

We are having exactly same requirement for one of our dapr/pulsar usecase. As it is not available in current implementation, we might need to go with alternate approach for time being.

ytatipaka avatar Feb 07 '23 08:02 ytatipaka

Just checking to see if there are plans to include this or this is being worked on. Is this project still going? Is DAPR viable? I can't even get the demo for pub sub to work and raised an issue for it and no response at all. Weeks before it was working, but seems like some change broke it.

christcottrell avatar May 04 '23 15:05 christcottrell

I was thinking that it would be great to have the Actor Reminder feature outside of actors. Sometimes you just need to schedule an event that fires at some point in the future. Building it into the pubsub system would be a great alternative without having to go through all of the boilerplate for setting up an actor for just this purpose.

clintsinger avatar Jun 27 '23 14:06 clintsinger

I was thinking that it would be great to have the Actor Reminder feature outside of actors. Sometimes you just need to schedule an event that fires at some point in the future. Building it into the pubsub system would be a great alternative without having to go through all of the boilerplate for setting up an actor for just this purpose.

This is being designed

yaron2 avatar Jun 27 '23 15:06 yaron2