Dave N
Dave N

Reputation: 219

How do consumers work with service bus topics?

My product has a long workflow process that needs to be done in the background. We have a UI application and separate restful services deployed in Azure app services.

We want to implement this workflow (some tasks can be done in parallel) for our business functionality that would be difficult to handle in chained restful calls. So it seems service bus using topics is the way to go. I think we'd put "events" on the service bus and necessary consumers would process them. What I'm unsure is how the consumer applications are subscribed/monitoring the topics, and what this application would be deployed on. Would it be a continuous webjob that subscribes or runs every minute? Are there capabilities such that the service bus itself can call a restful endpoint to notify the subscriber?

Is this even common pattern of using service bus?

Upvotes: 0

Views: 118

Answers (1)

Sean Feldman
Sean Feldman

Reputation: 25994

Consumers subscribe to topics. Subscription is essentially a queue that will contain the messages sent to the topic should those satisfy subscription criteria. Subscription criteria, or known as filter can be either a simple correlation filter or a more sophisticated SQL-like filter.

To receive messages from subscriptions, SubscriptionClient or MessageReceiver can be used. For sending, SubscriptionClient or MessageSender.

For hosting - anything that would either allow continuous polling (WebJobs, Cloud Services, Service Fabric, VMs) or can be event driven (Functions).

Upvotes: 2

Related Questions