{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/596","repository_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus","labels_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/596/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/596/events","html_url":"https://github.com/Particular/NServiceBus.AzureServiceBus/issues/596","id":248241590,"number":596,"title":"Question: Saga sending failure and how to handle > 100 actions from an event","user":{"login":"janpieterz","id":383634,"avatar_url":"https://avatars3.githubusercontent.com/u/383634?v=4","gravatar_id":"","url":"https://api.github.com/users/janpieterz","html_url":"https://github.com/janpieterz","followers_url":"https://api.github.com/users/janpieterz/followers","following_url":"https://api.github.com/users/janpieterz/following{/other_user}","gists_url":"https://api.github.com/users/janpieterz/gists{/gist_id}","starred_url":"https://api.github.com/users/janpieterz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janpieterz/subscriptions","organizations_url":"https://api.github.com/users/janpieterz/orgs","repos_url":"https://api.github.com/users/janpieterz/repos","events_url":"https://api.github.com/users/janpieterz/events{/privacy}","received_events_url":"https://api.github.com/users/janpieterz/received_events","type":"User","site_admin":false},"labels":[{"id":597463835,"url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/labels/State:%20Blocked","name":"State: Blocked","color":"e6e6e6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2017-08-06T11:31:30Z","updated_at":"2017-08-30T13:37:03Z","closed_at":null,"author_association":"NONE","body":"We're running into a scenario where we need to send out more than 100 different messages after 1 single (real life) event. \r\n\r\nWe have actions for users that can fail when something is offline. Every failure gets it's user id added to saga data (will be migrating away from this for limitations of saga table storage size limitations).\r\nWhen the failing bit goes online again, we want to notify the users that they can use the system again, as they've been alerted it's offline. This runs fine when less than a 100 users used the specific bit and had a failure, but since the connectivity isn't that great, we get a lot of these and keep going over a 100 users.\r\n\r\nNow since I'm going to need to rewrite this feature anyway, I was wondering how to handle this with Azure Service Bus. As it's a relatively generic thing 'notify >100 subscribers of change/action' (email/sms/push) I'm sure I'm just not thinking of some simple pattern.\r\n\r\nOptions I've thought of:\r\n\r\n- Reading and deleting from a list of these users and when reaching 99, sending a 'continue' message to self instead of closing saga. Would probably work but feels very dirty\r\n- Splitting saga off into max 100 user saga's and kicking off multiple saga's from the online event (would probably still run the receiving message in one transaction over those saga's and kick off this exception, plus it'd be difficult to manage the incoming 100 size limitation)\r\n- Store user ids in separate lists, let saga be aware of sub-sagas and kick off 1 message for each saga, saga's maintain at tops 100 and feed back when full, kicking off a new one. Downsides would be quite some message flows for this.\r\n- 'NotifyBatch': Maintain list separate from Saga to ensure no storage limitations hit, when event happens read list, split off into separate messages of 100 notifications which then splits off into 100 separate messages. Feels the cleanest to me.\r\n\r\nAny help would be appreciated, I'm probably just overlooking an obvious path.\r\n"},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/comments/325992406","html_url":"https://github.com/Particular/NServiceBus.AzureServiceBus/issues/596#issuecomment-325992406","issue_url":"https://api.github.com/repos/Particular/NServiceBus.AzureServiceBus/issues/596","id":325992406,"user":{"login":"janpieterz","id":383634,"avatar_url":"https://avatars3.githubusercontent.com/u/383634?v=4","gravatar_id":"","url":"https://api.github.com/users/janpieterz","html_url":"https://github.com/janpieterz","followers_url":"https://api.github.com/users/janpieterz/followers","following_url":"https://api.github.com/users/janpieterz/following{/other_user}","gists_url":"https://api.github.com/users/janpieterz/gists{/gist_id}","starred_url":"https://api.github.com/users/janpieterz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janpieterz/subscriptions","organizations_url":"https://api.github.com/users/janpieterz/orgs","repos_url":"https://api.github.com/users/janpieterz/repos","events_url":"https://api.github.com/users/janpieterz/events{/privacy}","received_events_url":"https://api.github.com/users/janpieterz/received_events","type":"User","site_admin":false},"created_at":"2017-08-30T13:37:03Z","updated_at":"2017-08-30T13:37:03Z","author_association":"NONE","body":"[Replication](https://github.com/janpieterz/NServiceBusASBBigSaga).\r\n\r\nRunning above with < 100 should be fine, running it with > 100 should fail once and swallow message. Make sure to edit the app.config with an ASB instance.\r\n\r\nAnother example where this seemed to happen is with the send to a non-existing queue. [See this line.](https://github.com/janpieterz/NServiceBusASBBigSaga/blob/master/NServiceBusBigSaga/NotificationSaga.cs#L41)\r\n\r\nLogic for # messages and when it pushes them out [is in here](https://github.com/janpieterz/NServiceBusASBBigSaga/blob/master/NServiceBusBigSaga/CreateNotification.cs#L16), besides that it should be pretty self-explanatory."}}
{"actor":{"display_login":"janpieterz"}}