{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/orleans/issues/1295","labels_url":"https://api.github.com/repos/dotnet/orleans/issues/1295/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/1295/comments","events_url":"https://api.github.com/repos/dotnet/orleans/issues/1295/events","html_url":"https://github.com/dotnet/orleans/issues/1295","id":127202989,"number":1295,"title":"PersistentStreamProvider: How to come up with a unique queue name in Adapter that a receiver can know? ","user":{"login":"amamh","id":2524201,"avatar_url":"https://avatars.githubusercontent.com/u/2524201?v=3","gravatar_id":"","url":"https://api.github.com/users/amamh","html_url":"https://github.com/amamh","followers_url":"https://api.github.com/users/amamh/followers","following_url":"https://api.github.com/users/amamh/following{/other_user}","gists_url":"https://api.github.com/users/amamh/gists{/gist_id}","starred_url":"https://api.github.com/users/amamh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amamh/subscriptions","organizations_url":"https://api.github.com/users/amamh/orgs","repos_url":"https://api.github.com/users/amamh/repos","events_url":"https://api.github.com/users/amamh/events{/privacy}","received_events_url":"https://api.github.com/users/amamh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/orleans/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-18T11:01:53Z","updated_at":"2016-01-20T08:54:04Z","closed_at":null,"body":"This is a question not an issue:\r\n\r\nAssume the following setup:\r\n- Using Redis as a backend to carry the streams. Each physical queue is just a simple Redis list.\r\n- Server\r\n  - **Adapter 0 is created by the server along with corresponding receivers**\r\n    - **Receivers need to know the Redis list name to read from.**\r\n  - Server reads using the receivers, caches and waits for Client 2 to subscriber.\r\n- Client 1 writes\r\n  - **Adapter 1 is created by Client 1. Adapter 1 chooses a name for the Redis list**\r\n- Client 2 reads\r\n  - Client is receiving messages from the server, it doesn't need to know anything beyond which provider to use.\r\n\r\n\r\nSo, the problem is that you have 2 different threads that need to share the same data. It doesn't have to be Redis, if I'm using MQ then I need to choose queue ID/name.\r\n\r\nWhatever name I use in the writing adapter in Client 1, the server adapter which reads needs to know that name.\r\n\r\nFor now what I'm doing is simply using a name that's based on the queue number and provider name \"orleans-MyProviderName-<QueueId>\"\r\n\r\nThe problem with that is if I create a new client which creates a new adapter, it will write to the same location and that will cause clashes if I also use the same stream GUID and namespace.\r\n\r\nThis seems like a common problem, there must be a simple way to solve this?"},"comment":{"url":"https://api.github.com/repos/dotnet/orleans/issues/comments/173132810","html_url":"https://github.com/dotnet/orleans/issues/1295#issuecomment-173132810","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/1295","id":173132810,"user":{"login":"amamh","id":2524201,"avatar_url":"https://avatars.githubusercontent.com/u/2524201?v=3","gravatar_id":"","url":"https://api.github.com/users/amamh","html_url":"https://github.com/amamh","followers_url":"https://api.github.com/users/amamh/followers","following_url":"https://api.github.com/users/amamh/following{/other_user}","gists_url":"https://api.github.com/users/amamh/gists{/gist_id}","starred_url":"https://api.github.com/users/amamh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amamh/subscriptions","organizations_url":"https://api.github.com/users/amamh/orgs","repos_url":"https://api.github.com/users/amamh/repos","events_url":"https://api.github.com/users/amamh/events{/privacy}","received_events_url":"https://api.github.com/users/amamh/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T08:54:04Z","updated_at":"2016-01-20T08:54:04Z","body":"@jason-bragg \r\n\r\nThanks for your suggestion, it's always good to know where I might have not followed a good approach. \r\n\r\nIn this instance, I think it makes sense to use the provider name in the resource name because only this particular provider knows how to read/write to resources (Redis lists) used by it.\r\n\r\nFor example, there is a particular batch container type used by this provider, so you wouldn't be able to deserialise (read) anything from these resources if you don't know that type."}}